bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/20475] Linking PIC executables with a linker script that does no


From: whitequark at whitequark dot org
Subject: [Bug ld/20475] Linking PIC executables with a linker script that does not place _GLOBAL_OFFSET_TABLE_ results in incorrect relocation
Date: Wed, 17 Aug 2016 06:04:38 +0000

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

--- Comment #1 from whitequark at whitequark dot org ---
The previous comment is not quite right.

1) The _GLOBAL_OFFSET_TABLE_ did not point at the end of .got.plt but at the
start.
2) This is a bug in the architecture-independent ELF backend.

The nature of the bug is very simple--it is an incorrect reuse of a global
variable. I have attached a patch. I've looked into writing a test but I am not
sure how to do it for this case. It would be enough to check for

        .got       00000000 _GLOBAL_OFFSET_TABLE_

instead of

        .got.plt       00000000 _GLOBAL_OFFSET_TABLE_

in objdump -t output.

-- 
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]