This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM] Fix handling of GOT_PREL in gas.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]