bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/15370] linker script does not group sections correctly when bu


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/15370] linker script does not group sections correctly when building ppc64 Linux kernel
Date: Thu, 04 Jun 2015 02:39:21 +0000

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

--- Comment #2 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=374082dfab280123f5a54a23b1c1b2cb893b4d2b

commit 374082dfab280123f5a54a23b1c1b2cb893b4d2b
Author: Cary Coutant <address@hidden>
Date:   Wed Jun 3 19:11:42 2015 -0700

    Fix gold to group sections correctly via linker script.

    In PR 15370, it is noted that gold does not distinguish between
    "*(.foo .bar)" and "*(.foo) *(.bar)" in linker scripts. In both
    cases, gold groups all .foo sections together, followed by all
    .bar sections, whereas in the first case, it should collect all
    .foo and .bar sections in the order seen.

    If you add sort specs, the Gnu linker has some bizarre corner
    cases that I do not try to replicate. In particular,
    "*(SORT_BY_NAME(.foo) SORT_BY_NAME(.bar))" does the same thing
    as "*(.foo) *(.bar)". But if you apply a sort spec
    to just one of several patterns, say, "*(SORT_BY_NAME(.foo) .bar)",
    the Gnu linker will collect any .bar section it sees before the
    first .foo, then all .foo sections, then all remaining .bar
    sections. With this patch, if any of the input patterns have a
    sort spec, gold will group them all as it did before; e.g.,
    all .foo sections followed by all .bar sections.

    2015-06-03  Cary Coutant  <address@hidden>

    gold/
        PR gold/15370
        * script-sections.cc
        (Output_section_element_input::set_section_addresses): When there
        are several patterns with no sort spec, put all sections in the same
        bin.
        * testsuite/Makefile.am (script_test_12): New testcase.
        (script_test_12i): New testcase.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/script_test_12.t: New test linker script.
        * testsuite/script_test_12i.t: New test linker script.
        * testsuite/script_test_12a.c: New test source file.
        * testsuite/script_test_12b.c: New test source file.

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