[Top][All Lists]

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

[Bug ld/20828] GC-ed DSO symbols make corresponding symbols defined by a

From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local
Date: Tue, 24 Jan 2017 14:06:45 +0000


--- Comment #28 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Maciej W. Rozycki <address@hidden>:


commit b531344c34b05fcd55ce65776ff50b9a752d60c1
Author: Maciej W. Rozycki <address@hidden>
Date:   Mon Jan 23 11:38:20 2017 +0000

    PR ld/20828: Reorder the symbol sweep stage of section GC

    Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
    wrongly forced local with section GC") and move the symbol sweep stage
    of section GC from `elf_gc_sweep' to `bfd_elf_size_dynamic_sections',
    avoiding the need to clear the `forced_local' marker, problematic for
    targets that have special processing in their `elf_backend_hide_symbol'
    handler.  Set `mark' instead in `bfd_elf_record_link_assignment' and,
    matching changes from commit 3bd43ebcb602 ("ld --gc-sections fail with
    __tls_get_addr_opt"), also in PowerPC `__tls_get_addr_opt' handling
    code, removing a:

    FAIL: PR ld/20828 dynamic symbols with section GC (version script)

    test suite failure with the `score-elf' target.

    The rationale is it is enough if symbols are swept at the beginning of
    `bfd_elf_size_dynamic_sections' as it is only in this function that the
    size of the GOT, the dynamic symbol table and other dynamic sections is
    determined, which will depend on the number of symbols making it to the
    dynamic symbol table.  It is also appropriate to do the sweep at this
    point as it is already after any changes have been made to symbols with
    `bfd_elf_record_link_assignment', and not possible any earlier as calls
    to that function are only made just beforehand -- barring audit entry
    processing -- via `gld${EMULATION_NAME}_find_statement_assignment'
    invoked from `gld${EMULATION_NAME}_before_allocation' which is the ELF
    handler for `ldemul_before_allocation'.

        PR ld/20828
        * elflink.c (bfd_elf_record_link_assignment): Revert last
        change and don't ever clear `forced_local'.  Set `mark'
        (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
        (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
        (bfd_elf_size_dynamic_sections): ... here.
        * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
        and set `mark' instead in `__tls_get_addr_opt' processing.
        * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.

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]