aboutsummaryrefslogtreecommitdiff
path: root/gold/main.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-07 05:45:07 +0000
committerIan Lance Taylor <iant@google.com>2008-02-07 05:45:07 +0000
commit1ef1f3d387940683bcba12c0bee8c5adfdef4bc7 (patch)
tree9868865fdd392b1acb03a2de230185da323bdef8 /gold/main.cc
parent5fe2a0f55b19713f5cfb423687ce51291c62d8d8 (diff)
downloadbinutils-1ef1f3d387940683bcba12c0bee8c5adfdef4bc7.zip
binutils-1ef1f3d387940683bcba12c0bee8c5adfdef4bc7.tar.gz
binutils-1ef1f3d387940683bcba12c0bee8c5adfdef4bc7.tar.bz2
Ignore version scripts for relocatable links.
Diffstat (limited to 'gold/main.cc')
-rw-r--r--gold/main.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/main.cc b/gold/main.cc
index 2f68e06..6e35658 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -166,6 +166,16 @@ main(int argc, char** argv)
write_debug_script(command_line.options().output_file_name(),
program_name, args.c_str());
+ // The GNU linker ignores version scripts when generating
+ // relocatable output. If we are not compatible, then we break the
+ // Linux kernel build, which uses a linker script with -r which must
+ // not force symbols to be local. It would actually be useful to
+ // permit symbols to be forced local with -r, though, as it would
+ // permit some linker optimizations. Perhaps we need yet another
+ // option to control this. FIXME.
+ if (parameters->output_is_object())
+ command_line.script_options()->version_script_info()->clear();
+
// The work queue.
Workqueue workqueue(command_line.options());