[PATCH 3/6] aix: remove handlers for negative r_symndx in relocate_section

CHIGOT, CLEMENT clement.chigot@atos.net
Tue Feb 16 09:57:04 GMT 2021


r_symndx can't be negative AFAIK. Thus all the checks are useless.
I still let a single BFD_ASSERT if it even happens. In this case,
revert this commit and maybe adds some checks in new relocation
functions.

bfd/ChangeLog:
2020-10-29  Clément Chigot  <clement.chigot@atos.net>

        * coff-rs6000.c (xcoff_reloc_type_toc): Remove negative
        rel->r_symndx handler.
        (xcoff_reloc_type_br): Likewize.
        (xcoff_ppc_relocate_section): Add BFD_ASSERT to prevent negative
        rel->r_symndx instead of a single if.
        * coff64-rs6000.c (xcoff64_reloc_type_br): Remove negative
        rel->r_symndx handler.
        (xcoff64_ppc_relocate_section): Addd BFD_ASSERT to prevent
        negative rel->r_symndx.


Clément Chigot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-aix-remove-handlers-for-negative-r_symndx-in-relocat.patch
Type: application/octet-stream
Size: 10809 bytes
Desc: 0003-aix-remove-handlers-for-negative-r_symndx-in-relocat.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20210216/59600005/attachment.obj>


More information about the Binutils mailing list