bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/25355] nm reports data variable as "T" with -flto


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/25355] nm reports data variable as "T" with -flto
Date: Tue, 11 Feb 2020 03:04:48 +0000

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

--- Comment #17 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 <address@hidden>:

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

commit 0aa99dcd70bce68f8efef310350a6294e1143382
Author: H.J. Lu <address@hidden>
Date:   Mon Feb 10 19:01:42 2020 -0800

    Use GCC LTO wrapper to get real symbols from LTO IR objects

    GCC LTO wrapper is needed to extract real symbols from LTO IR objects.
    This patch does the following:

    1. Set up GCC LTO wrapper for each LTO IR object.
    2. Run GCC LTO wrapper to get the real object.
    3. Extract symbol info from the real object.
    4. Cleanup afterwards.

    bfd/

        PR binutils/25355
        * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
        (EXECUTABLE_SUFFIX): Likewise.
        * config.in: Regenerated.
        * configure: Likewise.
        * plugin.c (bfd_plugin_close_and_cleanup): Removed.
        (plugin_list_entry): Add all_symbols_read, cleanup_handler,
        gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
        real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
        (get_lto_wrapper): New.
        (setup_lto_wrapper_env): Likewise.
        (current_plugin): Likewise.
        (register_all_symbols_read): Likewise.
        (register_cleanup): Likewise.
        (get_symbols): Likewise.
        (add_input_file): Likewise.
        (bfd_plugin_close_and_cleanup): Likewise.
        (claim_file): Removed.
        (register_claim_file): Set current_plugin->claim_file.
        (add_symbols): Make a copy of LTO symbols.  Set lto_nsyms and
        lto_syms in current_plugin.
        (try_claim): Use current_plugin->claim_file.  Call LTO plugin
        all_symbols_read handler.  Copy real symbols to plugin_data.
        Call LTO plugin cleanup handler.  Clean up for LTO wrapper.
        (try_load_plugin): Don't reuse the previous plugin for LTO
        wrapper.  Set up GCC LTO wrapper if possible.  Don't set
        plugin_list_iter->claim_file.
        (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
        possible.
        * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
        real_syms.

    ld/

        PR binutils/25355
        * testsuite/ld-plugin/lto.exp: Run PR binutils/25355 test.
        * testsuite/ld-plugin/pr25355.c: New file.
        * testsuite/ld-plugin/pr25355.d: Likewise.
        * testsuite/lib/ld-lib.exp (run_cc_link_tests): Support compile
        only dump.

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