This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Intended behavior of --weaken, --localize, --globalize in objcopy
- From: "Jake Ehrlich via binutils" <binutils at sourceware dot org>
- To: binutils at sourceware dot org
- Date: Sat, 28 Apr 2018 23:50:52 +0000
- Subject: Intended behavior of --weaken, --localize, --globalize in objcopy
- Reply-to: Jake Ehrlich <jakehehrlich at google dot com>
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?