[PATCH] gas: force a NULL value for BFD_RELOC_PPC*_TLSM on XCOFF.
CHIGOT, CLEMENT
clement.chigot@atos.net
Tue Jun 15 14:44:05 GMT 2021
Hi Alan,
Indeed, I've checked only with one problematic symbol. Thus,
the VMA was enough. I'll change that.
However, you might have an idea for a better approach.
What I want to do is to ensure that any symbol's value which
has a BFD_RELOC_PPC_TLSM relocation is always NULL.
By default, bfd backend will set this value to the address of the
symbol targeted by BFD_RELOC_PPC_TLSM.
For example, if "a" is a R_TLSM pointer to "b", I want "*a" to be
NULL, but for now "*a" is "@b". AIX linker is refusing it.
The only way I've managed to fix that is to set addend to be the
opposite of that bfd_install_relocation will put.
Thanks,
Clément
________________________________
From: Alan Modra <amodra@gmail.com>
Sent: Tuesday, June 15, 2021 4:24 PM
To: CHIGOT, CLEMENT <clement.chigot@atos.net>
Cc: binutils@sourceware.org <binutils@sourceware.org>
Subject: Re: [PATCH] gas: force a NULL value for BFD_RELOC_PPC*_TLSM on XCOFF.
Caution! External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
On Mon, Jun 14, 2021 at 01:20:28PM +0000, CHIGOT, CLEMENT via Binutils wrote:
> AIX linker seems to expect that symbols receiving a BFD_RELOC_PPC_TLSM
> or BFD_RELOC_PPC64_TLSM have a NULL value.
> Actually, it seems that all the TLS relocations generated by AIX
> assembly have a NULL value but only these two are mandatory.
I think "NULL value" might be losing something in translation. Your
patch seems to subtract off the symbol section VMA. That won't result
in a zero unless the symbol is first in the section. What is going
on here? A testcase would be good.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list