bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/32071] undefined weak hidden function symbols resolves to garb


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/32071] undefined weak hidden function symbols resolves to garbage with PIE
Date: Sat, 31 Aug 2024 11:46:50 +0000

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

--- Comment #3 from Sourceware Commits <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=229ecf80f35c64145678e537daf54358d16107e3

commit 229ecf80f35c64145678e537daf54358d16107e3
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Aug 21 08:06:41 2024 -0700

    gold: Always resolve non-default weak undefined to 0

    Non-default weak undefined symbols in executable and shared library are
    always resolved to 0 at runtime and don't need dynamic relocation.

    Tested on i686, x86-64, powerpc64le and aarch64.

            PR gold/32071
            * symtab.cc (Symbol::final_value_is_known): Always resolve
            non-default weak undefined symbol in executable and shared library
            to 0 at runtime.
            * symtab.h (Symbol::needs_dynamic_reloc): Return false for
            non-default weak undefined symbol in executable and shared library.
            * testsuite/Makefile.am: Add weak_undef_test_3 and
            weak_undef_test_4 tests.
            * testsuite/Makefile.in: Regenerated.
            * testsuite/weak_undef_lib_4.c: New file.
            * testsuite/weak_undef_test_3.c: Likewise.
            * testsuite/weak_undef_test_4.c: Likewise.

    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

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