mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
objcopy --weaken-symbol: apply to STB_GNU_UNIQUE symbols
PR binutils/28926 * objcopy.c (filter_symbols): Apply weaken to STB_GNU_UNIQUE symbols * NEWS: Mention feature. * testsuite/binutils-all/objcopy.exp (objcopy_test_symbol_manipulation): New test. * testsuite/binutils-all/weaken-gnu-unique.s: New.
This commit is contained in:
@ -1144,6 +1144,10 @@ proc objcopy_test_symbol_manipulation {} {
|
||||
verbose [file rootname $t]
|
||||
run_dump_test [file rootname $t]
|
||||
}
|
||||
|
||||
if { [supports_gnu_unique] } {
|
||||
run_dump_test "weaken-gnu-unique"
|
||||
}
|
||||
}
|
||||
|
||||
proc objcopy_test_elf_common_symbols {} {
|
||||
|
8
binutils/testsuite/binutils-all/weaken-gnu-unique.d
Normal file
8
binutils/testsuite/binutils-all/weaken-gnu-unique.d
Normal file
@ -0,0 +1,8 @@
|
||||
#name: weaken STB_GNU_UNIQUE symbols
|
||||
#PROG: objcopy
|
||||
#objcopy: -W foo
|
||||
#source: unique.s
|
||||
#readelf: -s
|
||||
|
||||
#...
|
||||
+[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +WEAK +DEFAULT +[1-9] foo
|
Reference in New Issue
Block a user