[Top][All Lists]

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

[Bug ld/21532] AArch64: Symbol address inconsistency across compilation

From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/21532] AArch64: Symbol address inconsistency across compilation units
Date: Thu, 15 Jun 2017 16:29:31 +0000


--- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Jiong Wang <address@hidden>:


commit 6353d82b8fa825c2143f41e84b0d5d4446c6e99a
Author: Jiong Wang <address@hidden>
Date:   Thu Jun 15 16:51:01 2017 +0100

    [AArch64] Allow COPY relocation elimination

      As discussed at the PR, this patch tries to avoid COPY relocation
    and propagate the original relocation into runtime if it was relocating on
    writable section.  The ELIMINATE_COPY_RELOCS has been set to true and it's
    underlying infrastructure has been improved so that the COPY reloc
    at least working on absoluate relocations (ABS64) on AArch64.

      BFD linker copy relocation elimination framwork requires the backend to
    allocate dynrelocs for all those relocation types that are possible to
    copy relocations.  This is for adjust_dynamic_symbol hook to be able to get
    symbol reference information.  Should one symbol is referenced by more than
    relocations, if there is any of them needs copy relocation then linker
    generate it.

        PR ld/21532
        * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
        (elfNN_aarch64_final_link_relocate): Also propagate relocations to
        runtime for if there needs copy relocation elimination.
        (need_copy_relocation_p): New function.  Return true for symbol with
        pc-relative references and if it's against read-only sections.
        (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
        (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
        that are related with accessing external objects.
        (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the
        in elfNN_aarch64_check_relocs.

        * testsuite/ld-aarch64/copy-reloc-exe-2.s: New test source file.
        * testsuite/ld-aarch64/copy-reloc-2.d: New test.
        * testsuite/ld-aarch64/copy-reloc-exe-eliminate.s: New test source
        * testsuite/ld-aarch64/copy-reloc-eliminate.d: New test.
        * testsuite/ld-aarch64/copy-reloc-so.s: Define new global objects.
        * testsuite/ld-aarch64/aarch64-elf.exp: Run new tests.

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]