diff options
author | Alan Modra <amodra@gmail.com> | 2013-04-22 15:03:01 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-04-22 15:03:01 +0000 |
commit | 86f7d49be5e3dee5ca8326e3766983a27a968486 (patch) | |
tree | 6a5b0263c77fa6507f3aff4631a29ebc443cd566 /bfd/elf-bfd.h | |
parent | eb6c553bd471121196d459e76db963c924cd526c (diff) | |
download | gdb-86f7d49be5e3dee5ca8326e3766983a27a968486.zip gdb-86f7d49be5e3dee5ca8326e3766983a27a968486.tar.gz gdb-86f7d49be5e3dee5ca8326e3766983a27a968486.tar.bz2 |
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/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 3b4bd6f..b643dbc 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; \ |