bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entri


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries
Date: Thu, 10 Mar 2022 02:35:55 +0000

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

--- Comment #11 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 <hjl@sourceware.org>:

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

commit 320fdefef139160c93089a19ba41a2fcc4121203
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Feb 2 14:40:03 2022 -0800

    ld: Add a before_plugin_all_symbols_read hook

    Add a before_plugin_all_symbols_read hook to load symbol references from
    DT_NEEDED entries, included from --copy-dt-needed-entries, before reading
    plugin symbols to properly resolve plugin symbol references.

    bfd/

            PR ld/28849
            * elf-bfd.h (elf_link_hash_table): Add handling_dt_needed.
            * elflink.c (_bfd_elf_merge_symbol): Don't set non_ir_ref_dynamic
            before plugin 'all symbols read' hook is called.

    ld/

            PR ld/28849
            * ldelf.c (ldelf_handle_dt_needed): New function.
            (ldelf_before_plugin_all_symbols_read): Likewise.
            (ldelf_after_open): Call ldelf_handle_dt_needed.
            * ldelf.h (ldelf_before_plugin_all_symbols_read): New.
            * ldemul.c (ldemul_before_plugin_all_symbols_read): Likewise.
            * ldemul.h (ldemul_before_plugin_all_symbols_read): Likewise.
            (ld_emulation_xfer_struct): Add before_plugin_all_symbols_read.
            * ldlang.c (lang_process): Call
            ldemul_before_plugin_all_symbols_read before calling
            plugin_call_all_symbols_read.
            * emultempl/elf.em
            (gld${EMULATION_NAME}_before_plugin_all_symbols_read): New.
            (LDEMUL_BEFORE_PLUGIN_ALL_SYMBOLS_READ): New.
            * emultempl/emulation.em (ld_${EMULATION_NAME}_emulation):
            Initialize the before_plugin_all_symbols_read field.
            * testsuite/ld-plugin/lto.exp: Run PR ld/28849 tests.
            * testsuite/ld-plugin/pr28849.d: New file.
            * testsuite/ld-plugin/pr28849a.c: Likewise.
            * testsuite/ld-plugin/pr28849b.c: 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]