diff options
author | Cary Coutant <ccoutant@google.com> | 2009-03-25 01:34:25 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2009-03-25 01:34:25 +0000 |
commit | 6d4796192d5ba3425f757344a9d67d47a9e768d9 (patch) | |
tree | 97ffbe7ee340e61422ec226d89f3a22ad063d77c | |
parent | fc3b640d978b8b07680feb80a69ddd8c05ee69bd (diff) | |
download | gdb-6d4796192d5ba3425f757344a9d67d47a9e768d9.zip gdb-6d4796192d5ba3425f757344a9d67d47a9e768d9.tar.gz gdb-6d4796192d5ba3425f757344a9d67d47a9e768d9.tar.bz2 |
* symtab.h (needs_plt_entry): Check for unsatisfied reference from
an executable.
(needs_dynamic_reloc): Likewise.
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/symtab.h | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index b51509a..7044e28 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2009-03-24 Cary Coutant <ccoutant@google.com> + + * symtab.h (needs_plt_entry): Check for unsatisfied reference from + an executable. + (needs_dynamic_reloc): Likewise. + 2009-03-24 Ian Lance Taylor <iant@google.com> * yyscript.y (file_cmd): Recognize EXTERN. diff --git a/gold/symtab.h b/gold/symtab.h index c96c6fb..660fc4d 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -530,6 +530,10 @@ class Symbol bool needs_plt_entry() const { + // An undefined symbol from an executable does not need a PLT entry. + if (this->is_undefined() && !parameters->options().shared()) + return false; + return (!parameters->doing_static_link() && this->type() == elfcpp::STT_FUNC && (this->is_from_dynobj() @@ -561,10 +565,10 @@ class Symbol if (parameters->doing_static_link()) return false; - // A reference to a weak undefined symbol from an executable should be + // A reference to an undefined symbol from an executable should be // statically resolved to 0, and does not need a dynamic relocation. // This matches gnu ld behavior. - if (this->is_weak_undefined() && !parameters->options().shared()) + if (this->is_undefined() && !parameters->options().shared()) return false; // A reference to an absolute symbol does not need a dynamic relocation. |