mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
PR27493, objcopy --weaken-symbol does not weaken undefined symbols
PR 27493 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols. * NEWS: Mention feature.
This commit is contained in:
parent
5789f845fb
commit
fd5c076a06
@ -1,3 +1,9 @@
|
||||
2021-03-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 27493
|
||||
* objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
|
||||
* NEWS: Mention feature.
|
||||
|
||||
2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/27486
|
||||
|
@ -1,5 +1,8 @@
|
||||
-*- text -*-
|
||||
|
||||
* objcopy --weaken, --weaken-symbol and --weaken-symbols now make undefined
|
||||
symbols weak on targets that support weak symbols.
|
||||
|
||||
* Readelf and objdump can now display and use the contents of .debug_sup
|
||||
sections.
|
||||
|
||||
|
@ -1673,7 +1673,8 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
|
||||
|
||||
if (keep)
|
||||
{
|
||||
if ((flags & BSF_GLOBAL) != 0
|
||||
if (((flags & BSF_GLOBAL) != 0
|
||||
|| undefined)
|
||||
&& (weaken || is_specified_symbol (name, weaken_specific_htab)))
|
||||
{
|
||||
sym->flags &= ~ BSF_GLOBAL;
|
||||
|
Loading…
Reference in New Issue
Block a user