This is the mail archive of the
mailing list for the binutils project.
Re: [ARM] gas miscompiles ADR statement
- From: Nick Clifton <nickc at redhat dot com>
- To: amodra at bigpond dot net dot au
- Cc: enrico dot scholz at sigma-chemnitz dot de, binutils at sources dot redhat dot com
- Date: 03 Dec 2002 09:30:17 +0000
- Subject: Re: [ARM] gas miscompiles ADR statement
- References: <firstname.lastname@example.org><20021203000110.GL27956@bubble.sa.bigpond.net.au>
> I'm guilty. The problem was introduced with my gas reloc rewrite.
> The following should fix it, but I'd like one of the ARM maintainers
> to OK it before I commit.
> * config/tc-arm.c (arm_force_relocation): Return 0 for IMMEDIATE
> and ADRL_IMMEDIATE.
Approved - but ...
> + /* Resolve immediate relocations even if the symbol is extern or weak. */
> + if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE
> + || fixp->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
> + return 0;
> return S_FORCE_RELOC (fixp->fx_addsy);
I think that the comment is probably too general. There are quite a
lot of other immediate relocations supported by the ARM:
Plus - I think that it would be a very good idea to include Enrico's
little test program in the ARM GAS testsuite, so that this bug does
not resurface in the future.