[PATCH 4/6] aix: correct HOWTO table and add missing relocations

CHIGOT, CLEMENT clement.chigot@atos.net
Thu Mar 11 13:49:50 GMT 2021

Since the last time AIX HOWTO table was modified, IBM has now
released an official documentation about XCOFF relocations.
This commit corrects the wrong ones and add some missing.
For now, the "custom" relocations made for xcoff_rtype2howto have
been kept.
The new relocations are still set as EMPTY_HOWTO because they will
be implemented in later commits.

In xcoff[64]_ppc_relocate_section, instead of recreating howto
from scratch, it's better to use the existing howto from the
table and fixing it according to r_size field.

2021-03-11  Clément Chigot  <clement.chigot@atos.net>

        * coff-rs6000.c (xcoff_calculate_relocation): Correct and
        add new relocations.
        (xcoff_howto_table): Likewise.
        (xcoff_rtype2howto): Increase r_type maximum value.
        (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
        of create a new one from scratch.  Enable only some relocations
        to have a changing r_size.
        * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
        (xcoff64_howto_table): Likewise.
        (xcoff64_rtype2howto): Likewise.
        (xcoff64_ppc_relocate_section): Likewise.
        * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.

2021-03-11  Clément Chigot  <clement.chigot@atos.net>

        * od-xcoff.c: Replace RTB by TRL entry.

2021-03-11  Clément Chigot  <clement.chigot@atos.net>

        * coff/xcoff.h (R_RTB): Removed.
        (R_TRL): Fix value.

Clément Chigot
1 rue de Provence - 38432 Échirolles - France

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-aix-correct-HOWTO-table-and-add-missing-relocations.patch
Type: application/octet-stream
Size: 34462 bytes
Desc: 0004-aix-correct-HOWTO-table-and-add-missing-relocations.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20210311/d15c43ce/attachment-0001.obj>

More information about the Binutils mailing list