bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE


From: hjl.tools at gmail dot com
Subject: [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE
Date: Fri, 06 Oct 2017 12:37:51 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22269

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|aarch64                     |aarch64, tilepro,ppc

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
For tilepro:

address@hidden glibc]$
/export/gnu/import/git/toolchain/install/compilers/tilepro-linux-gnu/bin/tilepro-glibc-linux-gnu-gcc
-c x.s
address@hidden glibc]$
/export/gnu/import/git/toolchain/install/compilers/tilepro-linux-gnu/bin/tilepro-glibc-linux-gnu-ld
-pie --no-dynamic-linker x.o
address@hidden glibc]$ readelf -rl a.out 

Elf file type is DYN (Shared object file)
Entry point 0x128
There are 4 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x00000000 0x00000000 0x00130 0x00130 R E 0x10000
  LOAD           0x00ff78 0x0001ff78 0x0001ff78 0x00088 0x00088 RW  0x10000
  DYNAMIC        0x00ff7c 0x0001ff7c 0x0001ff7c 0x00080 0x00080 RW  0x4
  GNU_RELRO      0x00ff78 0x0001ff78 0x0001ff78 0x00088 0x00088 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00     .hash .dynsym .dynstr .rela.dyn .text 
   01     .data.rel.ro .dynamic .got 
   02     .dynamic 
   03     .data.rel.ro .dynamic .got 

Relocation section '.rela.dyn' at offset 0x118 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
0001ff78  00000301 R_TILEPRO_32      00000000   func + 0
address@hidden glibc]$ 

For ppc,

address@hidden glibc]$
/export/gnu/import/git/toolchain/install/compilers/powerpc-linux-gnu/bin/powerpc-glibc-linux-gnu-gcc
-c x.s
address@hidden glibc]$
/export/gnu/import/git/toolchain/install/compilers/powerpc-linux-gnu/bin/powerpc-glibc-linux-gnu-ld
-pie --no-dynamic-linker x.o
address@hidden glibc]$ readelf -rl a.out 

Elf file type is DYN (Shared object file)
Entry point 0x110
There are 4 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x00000000 0x00000000 0x00114 0x00114 R E 0x10000
  LOAD           0x00ff7c 0x0001ff7c 0x0001ff7c 0x00094 0x00094 RWE 0x10000
  DYNAMIC        0x00ff80 0x0001ff80 0x0001ff80 0x00080 0x00080 RW  0x4
  GNU_RELRO      0x00ff7c 0x0001ff7c 0x0001ff7c 0x00084 0x00084 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00     .hash .dynsym .dynstr .rela.dyn .text 
   01     .data.rel.ro .dynamic .got 
   02     .dynamic 
   03     .data.rel.ro .dynamic 

Relocation section '.rela.dyn' at offset 0x104 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
0001ff7c  00000201 R_PPC_ADDR32      00000000   func + 0
address@hidden glibc]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]