Intended behavior of --weaken, --localize, --globalize in objcopy

Jake Ehrlich via binutils binutils@sourceware.org
Sat Apr 28 23:51:00 GMT 2018


Hi All,

Currently --weaken and --weaken-symbol seem to apply to undefined symbols.
The same appears to be true of --localize[-symbol] and
--globalize[-symbol]. It was pointed out to me that this might be intended
for --localize and --globalize per this code:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/objcopy.c;h=61c513b482dc89f66541889f947b951d4250555a;hb=HEAD#l1618

This code doesn't make it clear why the same is true for --weaken[-symbol]
as well though. This raises a few questions for me. 1) What is the intended
behavior of weaken/localize/globalize with respect to weather a symbol is
undefined? 2) Why is that behavior intended?



More information about the Binutils mailing list