diff options
author | Alan Modra <amodra@bigpond.net.au> | 2013-04-22 15:03:01 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2013-04-22 15:03:01 +0000 |
commit | f2469987720df2d5333e2e46e72c0caa00b40817 (patch) | |
tree | 0d70c509215a0bf85ad85e31270dc2f45692baa7 /bfd | |
parent | 8b336e6bdffba2095f20c39140ca1b4db9d5a9d1 (diff) | |
download | gdb-f2469987720df2d5333e2e46e72c0caa00b40817.tar.gz |
PR ld/15382
* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply
sh_size or reloc_count adjustment by count.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf-bfd.h | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c8d5619d7fc..0c62889362b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2013-04-22 Alan Modra <amodra@gmail.com> + PR ld/15382 + * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply + sh_size or reloc_count adjustment by count. + +2013-04-22 Alan Modra <amodra@gmail.com> + * elf64-ppc.c (ppc64_elf_check_relocs): Don't call create_linkage_sections here.. (ppc64_elf_init_stub_bfd): ..do so here. Return status. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 3b4bd6f9894..b643dbc8a80 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -2497,16 +2497,16 @@ extern asection _bfd_elf_large_com_section; rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section); \ \ /* Avoid empty output section. */ \ - if (rel_hdr->sh_size > count * rel_hdr->sh_entsize) \ + if (rel_hdr->sh_size > rel_hdr->sh_entsize) \ { \ - rel_hdr->sh_size -= count * rel_hdr->sh_entsize; \ + rel_hdr->sh_size -= rel_hdr->sh_entsize; \ rel_hdr = _bfd_elf_single_rel_hdr (input_section); \ - rel_hdr->sh_size -= count * rel_hdr->sh_entsize; \ + rel_hdr->sh_size -= rel_hdr->sh_entsize; \ \ memmove (rel, rel + count, \ (relend - rel - count) * sizeof (*rel)); \ \ - input_section->reloc_count -= count; \ + input_section->reloc_count--; \ relend -= count; \ rel--; \ continue; \ |