aboutsummaryrefslogtreecommitdiff
path: root/gold/output.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-09 19:45:08 +0000
committerIan Lance Taylor <iant@google.com>2007-11-09 19:45:08 +0000
commitd61c6bd41cb84434590a97fe13be433b418e0bbd (patch)
treeaf4fde3d02ba0eff58d98e6580fbfccf065838d7 /gold/output.cc
parent3462fcefc79fc7c3b5e6690bba33c6f53ef3d26a (diff)
downloadgdb-d61c6bd41cb84434590a97fe13be433b418e0bbd.zip
gdb-d61c6bd41cb84434590a97fe13be433b418e0bbd.tar.gz
gdb-d61c6bd41cb84434590a97fe13be433b418e0bbd.tar.bz2
From Cary Coutant: More shared library support, some refactorization.
Diffstat (limited to 'gold/output.cc')
-rw-r--r--gold/output.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gold/output.cc b/gold/output.cc
index ca99097..b191725 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -684,8 +684,11 @@ Output_data_got<size, big_endian>::Got_entry::write(unsigned char* pov) const
// If the symbol is resolved locally, we need to write out its
// value. Otherwise we just write zero. The target code is
// responsible for creating a relocation entry to fill in the
- // value at runtime.
- if (gsym->final_value_is_known())
+ // value at runtime. For non-preemptible symbols in a shared
+ // library, the target will need to record whether or not the
+ // value should be written (e.g., it may use a RELATIVE
+ // relocation type).
+ if (gsym->final_value_is_known() || gsym->needs_value_in_got())
{
Sized_symbol<size>* sgsym;
// This cast is a bit ugly. We don't want to put a