PR ld/5025
authorAlan Modra <amodra@gmail.com>
Sat, 15 Sep 2007 06:21:06 +0000 (06:21 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 15 Sep 2007 06:21:06 +0000 (06:21 +0000)
* emultempl/elf32.em (write_build_id_section): Correct test for
"missing" .note.gnu.build-id.  Downgrade error to a warning if
it has been discarded.

ld/ChangeLog
ld/emultempl/elf32.em

index 2ffe3976dc82aa9fc9ac9cc2a8d60ede8c653cba..d426fe1828081374d3ad88f202e46ab2cec96083 100644 (file)
@@ -1,3 +1,10 @@
+2007-09-15  Alan Modra  <amodra@bigpond.net.au>
+
+       PR ld/5025
+       * emultempl/elf32.em (write_build_id_section): Correct test for
+       "missing" .note.gnu.build-id.  Downgrade error to a warning if
+       it has been discarded.
+
 2007-09-08  Alan Modra  <amodra@bigpond.net.au>
 
        * ldwrite.c (build_link_order <lang_padding_statement_enum>): Correct
index 88381407cc340db214da954dfb4efe9905152c34..775458c61812924393e4ed83121a2a89ffeeb440 100644 (file)
@@ -936,10 +936,11 @@ gld${EMULATION_NAME}_write_build_id_section (bfd *abfd)
   Elf_External_Note *e_note;
 
   asec = info->sec;
-  if (asec->output_section == NULL)
+  if (bfd_is_abs_section (asec->output_section))
     {
-      einfo (_("%P: .note.gnu.build-id section missing"));
-      return FALSE;
+      einfo (_("%P: warning: .note.gnu.build-id section discarded,"
+              " --build-id ignored.\n"));
+      return TRUE;
     }
   i_shdr = &elf_section_data (asec->output_section)->this_hdr;