PR ld/10555
* emultempl/elf32.em (_after_open): Do not create a .note.gnu-build-id section if there are no input files.
This commit is contained in:
parent
604ab327fd
commit
e9e0a58e87
@ -1,3 +1,9 @@
|
||||
2009-08-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR ld/10555
|
||||
* emultempl/elf32.em (_after_open): Do not create a
|
||||
.note.gnu-build-id section if there are no input files.
|
||||
|
||||
2009-08-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* scripttempl/elfxtensa.sc (DISCARDED): Discard sections with
|
||||
|
@ -1049,6 +1049,15 @@ gld${EMULATION_NAME}_after_open (void)
|
||||
|
||||
abfd = link_info.input_bfds;
|
||||
|
||||
if (abfd == NULL)
|
||||
{
|
||||
/* PR 10555: If there are no input files do not
|
||||
try to create a .note.gnu-build-id section. */
|
||||
free (link_info.emit_note_gnu_build_id);
|
||||
link_info.emit_note_gnu_build_id = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = gld${EMULATION_NAME}_id_note_section_size (abfd, &link_info);
|
||||
if (size == 0)
|
||||
{
|
||||
@ -1066,6 +1075,7 @@ gld${EMULATION_NAME}_after_open (void)
|
||||
{
|
||||
struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd);
|
||||
struct build_id_info *b = xmalloc (sizeof *b);
|
||||
|
||||
b->style = link_info.emit_note_gnu_build_id;
|
||||
b->sec = s;
|
||||
elf_section_type (s) = SHT_NOTE;
|
||||
@ -1083,6 +1093,7 @@ gld${EMULATION_NAME}_after_open (void)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (link_info.relocatable)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user