bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/19002] .eh_frame error: "no .eh_frame_hdr table will be create


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/19002] .eh_frame error: "no .eh_frame_hdr table will be created" with gold
Date: Mon, 21 Mar 2016 02:18:06 +0000

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

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

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

commit 698400bfb91b3476d98edcb6a4bf5e4abe1c14cc
Author: Cary Coutant <address@hidden>
Date:   Sun Mar 20 19:15:56 2016 -0700

    Fix problem where gold cannot build .eh_frame_hdr from ld -r output.

    When running ld -r on objects that have comdat groups, when gold
    deduplicates a function in a comdat group, it removes the relocations
    from the EH information that referred to the dropped copy of the function.
    When running a final link using the result of the -r link, the missing
    relocation cause it to fail to recognize the FDE for the dropped
    function.

    This patch improves gold's FDE scanning to take into account the
    possibility that an FDE corresponds to a dropped function, and drops
    that FDE as well.

    Gnu ld, on the other hand, leaves the relocations in the ld -r output,
    but makes them R_NONE with an r_sym field of 0. This was sufficient to
    let both linkers recognize the FDE properly.

    With this fix, if you do an ld -r with gold, then do the final link with
    Gnu ld, the .eh_frame_hdr section will not be generated. To make it work
    with Gnu ld, we would have to leave the R_NONE relocations in, but I
    think it's better to drop the relocations entirely. I'd hope that if
    you're doing a -r link with gold, you'll also do the final link with
    gold.

    gold/
        PR gold/19002
        * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
        * testsuite/Makefile.am (eh_test_2): New test.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/eh_test_2.sh: New test script.
        * testsuite/eh_test_a.cc (bar): Make it comdat.
        * testsuite/eh_test_b.cc (bar): Add a duplicate copy.

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