{
asymbol * last_sym;
int last_sym_idx;
- unsigned int reloc_count;
- unsigned int idx;
- unsigned int entsize;
+ size_t reloc_count;
+ size_t idx;
+ bfd_size_type entsize;
arelent * src_irel;
bfd_byte * dst_rela;
}
reloc_count = hdr->sh_size / entsize;
- if (reloc_count <= 0)
+ hdr->sh_size = entsize * reloc_count;
+ if (reloc_count == 0)
{
_bfd_error_handler
/* xgettext:c-format */
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA): error: reloc table entry %u is empty"),
+ (_("%pB(%pA): error: reloc table entry %zu is empty"),
abfd, relsec, idx);
bfd_set_error (bfd_error_bad_value);
result = false;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA): error: secondary reloc %u"
+ (_("%pB(%pA): error: secondary reloc %zu"
" references a missing symbol"),
abfd, relsec, idx);
bfd_set_error (bfd_error_bad_value);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA): error: secondary reloc %u"
+ (_("%pB(%pA): error: secondary reloc %zu"
" references a deleted symbol"),
abfd, relsec, idx);
bfd_set_error (bfd_error_bad_value);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA): error: secondary reloc %u"
+ (_("%pB(%pA): error: secondary reloc %zu"
" is of an unknown type"),
abfd, relsec, idx);
bfd_set_error (bfd_error_bad_value);