aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-12-10 12:35:35 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-12-10 12:35:50 -0800
commitc5847ba7267b6eedd4b750f5eeece3ec037a27fd (patch)
tree4e4c0dce955a2d155dc9ad8ae1a46930613a53b6 /bfd
parent60269a4a36a78063d7563a32a6d34107cb52cca5 (diff)
downloadgdb-c5847ba7267b6eedd4b750f5eeece3ec037a27fd.zip
gdb-c5847ba7267b6eedd4b750f5eeece3ec037a27fd.tar.gz
gdb-c5847ba7267b6eedd4b750f5eeece3ec037a27fd.tar.bz2
ld -r doesn't need plugin for slim lto object
Plugin isn't required on slim lto object for relocatable link. bfd/ PR ld/19317 * linker.c (_bfd_generic_link_add_one_symbol): Don't complain plugin needed to handle slim lto object for relocatable link. ld/testsuite/ PR ld/19317 * ld-plugin/lto.exp (lto_no_fat): New. (lto_link_tests): Add a test for PR ld/19317. (lto_run_tests): Likewise. (run_ld_link_tests): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/linker.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a306cca..85f3ed4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19317
+ * linker.c (_bfd_generic_link_add_one_symbol): Don't complain
+ plugin needed to handle slim lto object for relocatable link.
+
2015-12-09 Sandra Loosemore <sandra@codesourcery.com>
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
diff --git a/bfd/linker.c b/bfd/linker.c
index 86a7a19..6c59102 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1475,7 +1475,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
else if (bfd_is_com_section (section))
{
row = COMMON_ROW;
- if (strcmp (name, "__gnu_lto_slim") == 0)
+ if (!bfd_link_relocatable (info)
+ && strcmp (name, "__gnu_lto_slim") == 0)
(*_bfd_error_handler)
(_("%s: plugin needed to handle lto object"),
bfd_get_filename (abfd));