summaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-04-22 15:03:01 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-04-22 15:03:01 +0000
commitb59f870d9cab1e14d9e916112530f01423b891c0 (patch)
tree100119e6d8c2bc01cd6dae7880409ba6aa6ae7ca /bfd/elf-bfd.h
parentd95c3602dd3151093918681529899e15b73a4f82 (diff)
downloadbinutils-redhat-b59f870d9cab1e14d9e916112530f01423b891c0.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/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 3b4bd6f989..b643dbc8a8 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; \