This is the mail archive of the
mailing list for the binutils project.
Re: [AARCH64] question about RELA relocations
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: weixiangyu <weixiangyu at huawei dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>, "marcus dot shawcroft at arm dot com" <marcus dot shawcroft at arm dot com>, "richard dot earnshaw at arm dot com" <richard dot earnshaw at arm dot com>
- Date: Sun, 31 Jan 2016 11:04:22 -0600
- Subject: Re: [AARCH64] question about RELA relocations
- Authentication-results: sourceware.org; auth=none
- References: <894B9D8AA7173E40BFFBBF195B8281BC1B7B9DCF at SZXEMI502-MBS dot china dot huawei dot com> <n99twmj80qd dot fsf at foss dot arm dot com>
On Tue, Jan 12, 2016 at 11:56:43AM +0000, Jiong Wang wrote:
> gcc combine should have combined:
> add x0, x0, :lo12:.LANCHOR0
> ldr x0, [x0,8]
> ldr x0, [x0,#:lo12:.LANCHOR0+8]
> It's not happen because combine pass invoked "init_recog_no_volatile" to
> prevent volatile memory to be combined. I guess combine is too
> conservative on this, purely combine contant offsets inside volatile
> memory should be safe. (CCed Segher).
[ For some reason I didn't see this mail before, sorry about that. ]
This is a well-known issue, see PR60749, PR50677, PR49807, likely more.
Simply allowing volatile refs is not conservative enough. Backends can
use a workaround like the msp430 port does, for those cases where it knows
it will work.