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: amodra at gmail dot com
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 23:31:05 +0000

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #5 from Alan Modra <amodra at gmail dot com> ---
Yes, your second patch is much better.  The first one probably would break some
other target.  Even better would be to use the value of _GLOBAL_OFFSET_TABLE_

          relocation
            -= (htab->root.hgot->root.u.def.value
                + htab->root.hgot->root.u.def.section->output_offset
                + htab->root.hgot->root.u.def.section->output_section->vma);

Assuming the or1k backend doesn't have other bugs in this area, that would
allow a script to define _GLOBAL_OFFSET_TABLE_ at somewhere other than the
start of .got.plt.  If the above tests out OK, please post the patch to
address@hidden noting my preapproval, and commit.

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