]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: ensure sections contents is zero for BFD_RELOC_PPC*_TLSM on XCOFF.
authorClément Chigot <clement.chigot@atos.net>
Mon, 14 Jun 2021 11:25:42 +0000 (13:25 +0200)
committerAlan Modra <amodra@gmail.com>
Thu, 17 Jun 2021 06:08:09 +0000 (15:38 +0930)
commit3478a63d7ed68d666f842f5b8fb5bdade619c817
tree59f2f76c4cab5ff09636525e9ac3485d17ce9d15
parent7993124ee29271697870824c3a626babc7d5ab85
gas: ensure sections contents is zero for BFD_RELOC_PPC*_TLSM on XCOFF.

AIX ld expects the section contents for relocations BFD_RELOC_PPC_TLSM
or BFD_RELOC_PPC64_TLSM to be zero.
Actually, it seems to be the case for all the TLS relocations
generated by AIX assembly but only these two are mandatory.

* config/tc-ppc.c (md_apply_fix): Adjust addend to nullify
section contents for BFD_RELOC_PPC_TLSM or
BFD_RELOC_PPC64_TLSM.
* testsuite/gas/ppc/xcoff-tlsm-32.d: New test.
* testsuite/gas/ppc/xcoff-tlsm-64.d: New test.
* testsuite/gas/ppc/xcoff-tlsm.s: New test.
* testsuite/gas/ppc/aix.exp: Run new tests.
gas/ChangeLog
gas/config/tc-ppc.c
gas/testsuite/gas/ppc/aix.exp
gas/testsuite/gas/ppc/xcoff-tlsm-32.d [new file with mode: 0644]
gas/testsuite/gas/ppc/xcoff-tlsm-64.d [new file with mode: 0644]
gas/testsuite/gas/ppc/xcoff-tlsm.s [new file with mode: 0644]