diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-08-04 22:22:13 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-08-04 22:22:13 +0000 |
commit | de4c45bd54870058d0ee91a652df9f1652b12cdb (patch) | |
tree | 84e4795da42d1cc11212fdea401c73944d38bac3 /gold/powerpc.cc | |
parent | e5e6a5ff6ea89e1f8627d16d492288e0b8e834b1 (diff) | |
download | gdb-de4c45bd54870058d0ee91a652df9f1652b12cdb.zip gdb-de4c45bd54870058d0ee91a652df9f1652b12cdb.tar.gz gdb-de4c45bd54870058d0ee91a652df9f1652b12cdb.tar.bz2 |
* symtab.h (Symbol::use_plt_offset): New function.
* i386.cc (Relocate::relocate): Call Symbol::use_plt_offset.
* powerpc.cc (Relocate::relocate): Likewise.
* sparc.cc (Relocate::relocate): Likewise.
* x86_64.cc (Relocate::relocate): Likewise.
* testsuite/weak_plt.sh: New test.
* testsuite/weak_plt_main.cc: New test.
* testsuite/weak_plt_shared.cc: New test.
* testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh.
(check_PROGRAMS): Add weak_plt.
(check_DATA): Add weak_plt_shared.so.
(weak_plt_main_pic.o, weak_plt): New targets.
(weak_plt_shared_pic.o, weak_plt_shared.so): New targets.
* testsuite/Makefile.in: Rebuild.
* testsuite/Makefile.am (weak_alias_test_1.so): Depend upon
gcctestdir/ld.
(weak_alias_test_2.so, weak_alias_test_4.so): Likewise.
* testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index d69e942..421cfdb 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -1547,10 +1547,12 @@ Target_powerpc<size, big_endian>::Relocate::relocate( // Pick the value to use for symbols defined in shared objects. Symbol_value<size> symval; if (gsym != NULL - && (gsym->is_from_dynobj() - || (parameters->options().shared() - && (gsym->is_undefined() || gsym->is_preemptible()))) - && gsym->has_plt_offset()) + && gsym->use_plt_offset(r_type == elfcpp::R_POWERPC_REL24 + || r_type == elfcpp::R_PPC_LOCAL24PC + || r_type == elfcpp::R_PPC_REL16 + || r_type == elfcpp::R_PPC_REL16_LO + || r_type == elfcpp::R_PPC_REL16_HI + || r_type == elfcpp::R_PPC_REL16_HA)) { elfcpp::Elf_Xword value; |