public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix detection of missing plugin for LTO objects.
@ 2019-08-16 11:40 gdb-buildbot
  2019-08-16 11:30 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gdb-buildbot @ 2019-08-16 11:40 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT b4c555cfc48689d45481effff23c9017a4f3557f ***

commit b4c555cfc48689d45481effff23c9017a4f3557f
Author:     Martin Liska <mliska@suse.cz>
AuthorDate: Fri Aug 16 13:14:36 2019 +0200
Commit:     Martin Liska <mliska@suse.cz>
CommitDate: Fri Aug 16 13:14:36 2019 +0200

    Fix detection of missing plugin for LTO objects.
    
    2019-08-16  Martin Liska  <mliska@suse.cz>
    
            PR ld/24912
            * elflink.c: Report error only for not relocatable.
            * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
            here lto_slim_object as it's handled in caller.
    2019-08-16  Martin Liska  <mliska@suse.cz>
    
            PR ld/24912
            * object.cc (big_endian>::do_layout): Do not report error,
            but only set a flag.
            (big_endian>::do_add_symbols): Report error only for when
            relocatable.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5c3efb94c8..868796a8c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-16  Martin Liska  <mliska@suse.cz>
+
+	PR ld/24912
+	* elflink.c: Report error only for not relocatable.
+	* linker.c (_bfd_generic_link_add_one_symbol): Do not handle
+	here lto_slim_object as it's handled in caller.
+
 2019-08-16  Alan Modra  <amodra@gmail.com>
 
 	* elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index c7440d19ff..16d83bb7a3 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4401,7 +4401,8 @@ error_free_dyn:
       goto error_free_vers;
     }
 
-  if (abfd->lto_slim_object)
+  if (!bfd_link_relocatable (info)
+      && abfd->lto_slim_object)
     {
       _bfd_error_handler
 	(_("%pB: plugin needed to handle lto object"), abfd);
diff --git a/bfd/linker.c b/bfd/linker.c
index edbd0a7df4..1b71fcf8f0 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1421,24 +1421,12 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
   else if (bfd_is_com_section (section))
     {
       row = COMMON_ROW;
-      static bfd_boolean report_plugin_err = TRUE;
-      if (!bfd_link_relocatable (info) && report_plugin_err)
-	{
-	  if (abfd->lto_slim_object)
-	    {
-	      report_plugin_err = FALSE;
-	      _bfd_error_handler
-		(_("%pB: plugin needed to handle lto object"), abfd);
-	    }
-	  else if (name[0] == '_'
-		   && name[1] == '_'
-		   && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
-	    {
-	      report_plugin_err = FALSE;
-	      _bfd_error_handler
-		(_("%pB: plugin needed to handle lto object"), abfd);
-	    }
-	}
+      if (!bfd_link_relocatable (info)
+	  && name[0] == '_'
+	  && name[1] == '_'
+	  && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
+	_bfd_error_handler
+	  (_("%pB: plugin needed to handle lto object"), abfd);
     }
   else
     row = DEF_ROW;
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 85af0a3f87..6fe991d80d 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2019-08-16  Martin Liska  <mliska@suse.cz>
+
+	PR ld/24912
+	* object.cc (big_endian>::do_layout): Do not report error,
+	but only set a flag.
+	(big_endian>::do_add_symbols): Report error only for when
+	relocatable.
+
 2019-08-02  Alan Modra  <amodra@gmail.com>
 
 	* powerpc.cc (Target_powerpc::Scan::get_reference_flags): Set
diff --git a/gold/object.cc b/gold/object.cc
index 86c519acf7..d505ce4752 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -1887,8 +1887,7 @@ Sized_relobj_file<size, big_endian>::do_layout(Symbol_table* symtab,
 	  const unsigned char* pcontents = this->section_contents(i, &contents_len, false);
 	  struct lto_section lsection = *(const lto_section*)pcontents;
 	  if (lsection.slim_object)
-	    gold_info(_("%s: plugin needed to handle lto object"),
-		      this->name().c_str());
+	    layout->set_lto_slim_object ();
 	}
     }
 
@@ -2127,7 +2126,8 @@ Sized_relobj_file<size, big_endian>::do_add_symbols(Symbol_table* symtab,
 
   this->symbols_.resize(symcount);
 
-  if (layout->is_lto_slim_object ())
+  if (!parameters->options().relocatable()
+      && layout->is_lto_slim_object ())
     gold_info(_("%s: plugin needed to handle lto object"),
 	      this->name().c_str());
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-18  4:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 11:40 [binutils-gdb] Fix detection of missing plugin for LTO objects gdb-buildbot
2019-08-16 11:30 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-08-16 11:54 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
2019-08-18  4:05 ` Failures on Fedora-i686, " gdb-buildbot
2019-08-18  4:10 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-08-18  4:31 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-08-18  4:44 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-08-18  5:06 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-08-18  5:06 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-08-18  5:20 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).