[PATCH][ARM] Fix handling of GOT_PREL in gas.
Richard Earnshaw
rearnsha@arm.com
Thu Sep 16 09:25:00 GMT 2010
On Thu, 2010-09-16 at 01:44 -0700, Doug Kwan (關振德) wrote:
> Hi
>
> This patch fixes a problem in which gas fails to assemble data
> expression in the form:
>
> symbol(GOT_PREL) + (. - (.LPIC0 + 4))
>
> where .LPIC0 is a local label defined in the same function after the
> data expression. Currently, LPIC0 is undefined when the data
> expression is processed and that causes an error in the function
> expr() because the two operands of the addition have different
> segments. The patch adds code to handle this situation. This is
> tested by the running the gas test suite and the new test case in this
> patch.
>
> -Doug
>
> gas/ChangeLog:
> 2010-09-16 Doug Kwan <dougkwan@google.com>
>
> * config/tc-arm.c (s_arm_elf_cons): Handle R_ARM_GOT_PREL specially.
>
> gas/testsuite/ChangeLog:
>
> 2010-09-16 Doug Kwan <dougkwan@google.com>
>
> * gas/arm/got_prel2.d: New.
> * gas/arm/got_prel2.s: New.
This really sounds to me like something that should be handled in a more
generic way than a special-case hack in the back-end.
R.
More information about the Binutils
mailing list