* elfcode.h (elf_write_relocs): Do nothing if there are no
relocations.
This commit is contained in:
parent
a345bcaad9
commit
9a44bbd9a9
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* elfcode.h (elf_write_relocs): Do nothing if there are no
|
||||||
|
relocations.
|
||||||
|
|
||||||
2005-06-10 Alan Modra <amodra@bigpond.net.au>
|
2005-06-10 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* dwarf2.c (decode_line_info): Revert last change. Instead set
|
* dwarf2.c (decode_line_info): Revert last change. Instead set
|
||||||
|
|
|
@ -875,6 +875,12 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data)
|
||||||
if (sec->reloc_count == 0)
|
if (sec->reloc_count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* If we have opened an existing file for update, reloc_count may be
|
||||||
|
set even though we are not linking. In that case we have nothing
|
||||||
|
to do. */
|
||||||
|
if (sec->orelocation == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
rela_hdr = &elf_section_data (sec)->rel_hdr;
|
rela_hdr = &elf_section_data (sec)->rel_hdr;
|
||||||
|
|
||||||
rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count;
|
rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count;
|
||||||
|
|
Loading…
Reference in a new issue