diff options
author | Cary Coutant <ccoutant@google.com> | 2010-09-12 19:58:02 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-09-12 19:58:02 +0000 |
commit | d89051bdb1e0cf96b89a41c1e0bda50ee1bc288a (patch) | |
tree | ac956adca25f822cb2d6b8d51438e2ce2309a39b /gold/symtab.h | |
parent | e866c49707d6b97b6763baddaa2773e4ee893102 (diff) | |
download | gdb-d89051bdb1e0cf96b89a41c1e0bda50ee1bc288a.zip gdb-d89051bdb1e0cf96b89a41c1e0bda50ee1bc288a.tar.gz gdb-d89051bdb1e0cf96b89a41c1e0bda50ee1bc288a.tar.bz2 |
* symtab.h (Symbol::needs_dynamic_reloc): Non-PIC calls from
position-independent executables to shared libraries need dynamic
relocations.
(Symbol::may_need_copy_reloc): Do not generate COPY relocs in
position-independent executables.
* testsuite/Makefile.am (two_file_mixed_pie_test): New test.
* testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r-- | gold/symtab.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/symtab.h b/gold/symtab.h index e64fa1a..e355b2a 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -657,7 +657,8 @@ class Symbol // shared library cannot use a PLT entry. if ((flags & FUNCTION_CALL) && this->has_plt_offset() - && !((flags & NON_PIC_REF) && parameters->options().shared())) + && !((flags & NON_PIC_REF) + && parameters->options().output_is_position_independent())) return false; // A reference to any PLT entry in a non-position-independent executable @@ -798,7 +799,7 @@ class Symbol bool may_need_copy_reloc() const { - return (!parameters->options().shared() + return (!parameters->options().output_is_position_independent() && parameters->options().copyreloc() && this->is_from_dynobj() && !this->is_func()); |