diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-08 22:49:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-08 22:49:22 +0000 |
commit | 8fc19601e8cc9e67bbc39c41fd368df15dcc20aa (patch) | |
tree | 508721bdc307d3a9917507013f648fb79e4fcd0f /gold/i386.cc | |
parent | 8da2a1df1661ca37851fd21c1dda16d433a5811a (diff) | |
download | gdb-8fc19601e8cc9e67bbc39c41fd368df15dcc20aa.zip gdb-8fc19601e8cc9e67bbc39c41fd368df15dcc20aa.tar.gz gdb-8fc19601e8cc9e67bbc39c41fd368df15dcc20aa.tar.bz2 |
From Cary Coutant: fix handling of undefined symbols in shared
libraries.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r-- | gold/i386.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/i386.cc b/gold/i386.cc index 3bcfa4c..d6e42f4 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -1207,7 +1207,9 @@ Target_i386::Scan::global(const General_options& options, // If this symbol is not fully resolved, we need to add a // GOT entry with a dynamic relocation. Reloc_section* rel_dyn = target->rel_dyn_section(layout); - if (gsym->is_from_dynobj() || gsym->is_preemptible()) + if (gsym->is_from_dynobj() + || gsym->is_undefined() + || gsym->is_preemptible()) got->add_global_with_rel(gsym, rel_dyn, elfcpp::R_386_GLOB_DAT); else { @@ -1543,7 +1545,7 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo, if (gsym != NULL && (gsym->is_from_dynobj() || (parameters->output_is_shared() - && gsym->is_preemptible())) + && (gsym->is_undefined() || gsym->is_preemptible()))) && gsym->has_plt_offset() && (!is_nonpic || !parameters->output_is_shared())) { |