bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/21452] Enable safe ICF for shared object


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/21452] Enable safe ICF for shared object
Date: Tue, 13 Oct 2020 12:17:08 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21452

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aac1d94f19492fb6bea7193497bce599952c429d

commit aac1d94f19492fb6bea7193497bce599952c429d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Oct 13 05:10:24 2020 -0700

    Gold: Enable safe ICF for shared object on x86-64

    With

    commit 4aebb6312eb5dcd12f2f8420028547584b708907
    Author: Rahul Chaudhry <rahulchaudhry@google.com>
    Date:   Wed Feb 15 00:37:10 2017 -0800

        Improved support for --icf=safe when used with -pie.

    we now check opcode with R_X86_64_PC32 relocation, which tell branches
    from other instructions.  We can enable safe ICF for shared object on
    x86-64.  Also, global symbols with non-default visibility should be
    folded like local symbols.

            PR gold/21452
            * x86_64.cc (Scan::local_reloc_may_be_function_pointer): Remove
            check for shared library.
            (Scan::global_reloc_may_be_function_pointer): Remove check for
            shared library and symbol visibility.
            * testsuite/icf_safe_so_test.cc (bar_static): New function.
            (main): Take function address of bar_static and use it.
            * testsuite/icf_safe_so_test.sh (arch_specific_safe_fold): Also
            check fold on x86-64.  Check bar_static isn't folded.

-- 
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]