bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12771] internal error in value_from_output_section, at ../../g


From: dougkwan at google dot com
Subject: [Bug gold/12771] internal error in value_from_output_section, at ../../gold/reloc.cc:1508 on armel
Date: Thu, 30 Jun 2011 06:51:18 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12771

--- Comment #9 from Doug Kwan <dougkwan at google dot com> 2011-06-30 06:51:00 
UTC ---
Thanks for fix that.  I will submit a patch later to convert to
unaligned swaps as needed.

-Doug

On Wed, Jun 29, 2011 at 11:01 PM, ian at airs dot com
<address@hidden> wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=12771
>
> Ian Lance Taylor <ian at airs dot com> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|RESOLVED                    |REOPENED
>                 CC|                            |dougkwan at google dot com,
>                   |                            |ian at airs dot com
>         Resolution|WORKSFORME                  |
>
> --- Comment #8 from Ian Lance Taylor <ian at airs dot com> 2011-06-30 
> 06:00:32 UTC ---
> OK, I looked at this a bit more.  It's possible that this is being caused by 
> an
> unaligned access.  I see that on ARM an unaligned access will load rotated
> bytes.  Does this happen on the emulator?
>
> This object file has unaligned R_ARM_ABS32 relocations against the .debug_info
> section.  When the linker fetches the addend for those relocations, it will do
> an unaligned read.
>
> Try changing the function Arm_relocate_functions::abs32 around line 3284 of
> arm.cc to this:
>
>  // R_ARM_ABS32: (S + A) | T
>  static inline typename This::Status
>  abs32(unsigned char* view,
>    const Sized_relobj_file<32, big_endian>* object,
>    const Symbol_value<32>* psymval,
>    Arm_address thumb_bit)
>  {
>    typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype;
>    Valtype addend = elfcpp::Swap_unaligned<32, big_endian>::readval(view);
>    Valtype x = psymval->value(object, addend) | thumb_bit;
>    elfcpp::Swap_unaligned<32, big_endian>::writeval(view, x);
>    return This::STATUS_OKAY;
>  }
>
> If that change fixes the crash, then it is indeed an unaligned access problem.
>
> The ARM ELF ABI does suggest that there is no required alignment for
> relocations, so it does seem that much of the code in Arm_relocation_functions
> needs to use Swap_unaligned rather than Swap.
>
> --
> Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]