https://sourceware.org/bugzilla/show_bug.cgi?id=33237
Bug ID: 33237
Summary: No PLT (PIE 1[fg]) FAIL on Solaris/amd64
Product: binutils
Version: 2.46 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Target: amd64-pc-solaris2.11
Two tests FAIL on 64-bit Solaris/x86:
FAIL: No PLT (PIE 1f)
FAIL: No PLT (PIE 1g)
Both abort. When single-stepping, I find that this happens at
cmpq %rax, func_p(%rip)
in ld-x86-64/no-plt-check1.S.
When repeating the link with /bin/ld, both tests PASS.
I don't yet see what's wrong, actually, but notice that the text segment
headers
differ:
* with gld:
Program Header[2]:
p_vaddr: 0 p_flags: [ PF_X PF_R ]
p_paddr: 0 p_type: [ PT_LOAD ]
p_filesz: 0xc98 p_memsz: 0xc98
p_offset: 0 p_align: 0x100000
* with ld:
Program Header[2]: text
p_vaddr: 0x400000 p_flags: [ PF_X PF_R ]
p_paddr: 0 p_type: [ PT_LOAD ]
p_filesz: 0x1351 p_memsz: 0x1351
p_offset: 0 p_align: 0x100000
When trying to relink with -Wl,-Ttext=0x400000, the output looks weird: there
are two segments now:
Program Header[2]:
p_vaddr: 0 p_flags: [ PF_X PF_R ]
p_paddr: 0 p_type: [ PT_LOAD ]
p_filesz: 0x970 p_memsz: 0x970
p_offset: 0 p_align: 0x100000
Program Header[3]:
p_vaddr: 0x400000 p_flags: [ PF_X PF_R ]
p_paddr: 0x400000 p_type: [ PT_LOAD ]
p_filesz: 0x368 p_memsz: 0x368
p_offset: 0x100000 p_align: 0x100000
and the resulting binary still aborts.
--
You are receiving this mail because:
You are on the CC list for the bug.