diff options
author | Alan Modra <amodra@gmail.com> | 2017-09-20 09:17:56 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-09-20 09:56:19 +0930 |
commit | 64b5d6d785eb4c337b7c071ab9607186541a8b14 (patch) | |
tree | c6dd995b5b91dde8a284551d384e637526c68ea3 /gold/ChangeLog | |
parent | dba74cb2b725ee8857dee865fb7f49c86aad1aed (diff) | |
download | binutils-64b5d6d785eb4c337b7c071ab9607186541a8b14.zip binutils-64b5d6d785eb4c337b7c071ab9607186541a8b14.tar.gz binutils-64b5d6d785eb4c337b7c071ab9607186541a8b14.tar.bz2 |
[GOLD] PowerPC function address in non-PIC
ppc32, like many targets, defines the address of a function as the PLT
call stub code for functions referenced but not defined in a non-PIC
executable. ppc32 gold, unlike other targets, inherits the ppc64
multiple stub capability for dealing with very large binaries where
one set of stubs can't be reached from all code locations. This means
there can be multiple choices of address for a function, which might
cause function pointer comparison failures. So for ppc32, make
non-branch references always use the first stub group.
(PowerPC64 ELFv1 is always PIC so doesn't need to define the address
of an external function as the PLT stub. PowerPC64 ELFv2 needs a
special set of global entry stubs to serve as the address of external
functions, so it too is not affected by this bug.)
* powerpc.cc (Target_powerpc::Branch_info::make_stub): Put
stubs for ppc32 non-branch relocs in first stub table.
(Target_powerpc::Relocate::relocate): Resolve similarly.
Diffstat (limited to 'gold/ChangeLog')
-rw-r--r-- | gold/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 867cbef..4faf195 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2017-09-20 Alan Modra <amodra@gmail.com> + + * powerpc.cc (Target_powerpc::Branch_info::make_stub): Put + stubs for ppc32 non-branch relocs in first stub table. + (Target_powerpc::Relocate::relocate): Resolve similarly. + 2017-09-19 Alan Modra <amodra@gmail.com> * options.h (stub-group-multi): Default to true. Add |