diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-08-21 08:06:41 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-08-31 04:28:43 -0700 |
commit | 229ecf80f35c64145678e537daf54358d16107e3 (patch) | |
tree | 002fe18fdda681c9d4613533bc184f159580c516 /gold/testsuite/split_s390_1_z2.s | |
parent | 1a86b364a30f60abaa4762dd1b9af3818840416c (diff) | |
download | fsf-binutils-gdb-229ecf80f35c64145678e537daf54358d16107e3.zip fsf-binutils-gdb-229ecf80f35c64145678e537daf54358d16107e3.tar.gz fsf-binutils-gdb-229ecf80f35c64145678e537daf54358d16107e3.tar.bz2 |
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>
Diffstat (limited to 'gold/testsuite/split_s390_1_z2.s')
0 files changed, 0 insertions, 0 deletions