diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-13 01:20:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-13 01:20:38 +0000 |
commit | caa9d5d9191af934ff7949fea080d72524c92cfa (patch) | |
tree | 4735eee01bed88199f39c2ef31ce1a4170e4a358 /gold/script.cc | |
parent | 7508a0934ec2fad27f393d3b1a6e1207dab3fd2d (diff) | |
download | gdb-caa9d5d9191af934ff7949fea080d72524c92cfa.zip gdb-caa9d5d9191af934ff7949fea080d72524c92cfa.tar.gz gdb-caa9d5d9191af934ff7949fea080d72524c92cfa.tar.bz2 |
Assignments in linker scripts override definitions from object files.
Diffstat (limited to 'gold/script.cc')
-rw-r--r-- | gold/script.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/script.cc b/gold/script.cc index 128acae..3213115 100644 --- a/gold/script.cc +++ b/gold/script.cc @@ -895,6 +895,10 @@ class Script_unblock : public Task // necessarily evaluate the expression until all ordinary symbols have // been finalized. +// The GNU linker lets symbol assignments in the linker script +// silently override defined symbols in object files. We are +// compatible. FIXME: Should we issue a warning? + void Symbol_assignment::add_to_table(Symbol_table* symtab) { @@ -907,7 +911,8 @@ Symbol_assignment::add_to_table(Symbol_table* symtab) elfcpp::STB_GLOBAL, vis, 0, // nonvis - this->provide_); + this->provide_, + true); // force_override } // Finalize a symbol value. |