bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/27451] ld: Provide a way to make C identifier name sections GCab


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/27451] ld: Provide a way to make C identifier name sections GCable under __start_/__stop_ references
Date: Mon, 01 Mar 2021 06:59:17 +0000

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit 8ee10e86093150c70360d9e26b29e6d9b6398f33
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Mar 1 08:22:49 2021 +1030

    PR27451, -z start_stop_gc

    When --gc-sections is in effect, a reference from a retained section
    to __start_SECNAME or __stop_SECNAME causes all input sections named
    SECNAME to also be retained, if SECNAME is representable as a C
    identifier and either __start_SECNAME or __stop_SECNAME is synthesized
    by the linker.  Add an option to disable that feature, effectively
    ignoring any relocation that references a synthesized linker defined
    __start_ or __stop_ symbol.

            PR 27451
    include/
            * bfdlink.h (struct bfd_link_info): Add start_stop_gc.
    bfd/
            * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
            defined start/stop symbols when start_stop_gc.
            (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
            (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
            * linker.c (bfd_generic_define_start_stop): Likewise.
    ld/
            * emultempl/elf.em: Handle -z start-stop-gc and -z nostart-stop-gc.
            * lexsup.c (elf_static_list_options): Display help for them.  Move
            help for -z stack-size to here from elf_shlib_list_options. Add
            help for -z start-stop-visibility and -z undefs.
            * ld.texi: Document -z start-stop-gc and -z nostart-stop-gc.
            * NEWS: Mention -z start-stop-gc.
            * testsuite/ld-gc/start2.s,
            * testsuite/ld-gc/start2.d: New test.
            * testsuite/ld-gc/gc.exp: Run it.

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