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]

[GOLD][PATCH] Fix for PR gold/12771 (unaligned ARM static data relocs)


Hi Ian,

    This patch fixes all static data relocs in the ARM backend to use
unaligned accesses.  I also added a test case.  There is not much code
to fix because most all 32-bit static data relocs share code with
either ABS32 or REL32.

-Doug


2011-07-05  Doug Kwan  <dougkwan@google.com>

        PR gold/12771
        * arm.cc (Arm_relocate_functions::abs8): Use int32_t for addend and
        Arm_Address type for relocation result.
        (Arm_relocate_functions::abs16): Use unaligned access.  Also fix
        overflow check.
        (Arm_relocate_functions::abs32): Use unaligned access.
        (Arm_relocate_functions::rel32): Ditto.
        (Arm_relocate_functions::prel31): Ditto.
        (Arm_exidix_cantunwind::do_fixed_endian_write): Ditto.
        * testsuite/Makefile.am: Add new test arm_unaligned_reloc for unaligned
        static data relocations.
        * testsuite/Makefile.in: Regnerate.
        * testsuite/arm_unaligned_reloc.{s,sh}: New files.

Attachment: patch-unaligned.txt
Description: Text document


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