https://bugs.llvm.org/show_bug.cgi?id=49362
Bug ID: 49362
Summary: Should --weaken-symbol(s) be prevented from marking
undef globals as weak?
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: llvm-objcopy/strip
Assignee: unassignedb...@nondot.org
Reporter: jh7370.2...@my.bristol.ac.uk
CC: alexander.v.shaposhni...@gmail.com,
jake.h.ehrl...@gmail.com,
jh7370.2...@my.bristol.ac.uk,
llvm-bugs@lists.llvm.org, ruppre...@google.com
GNU objcopy --weaken-symbol does not change mentioned symbols to STB_WEAK
binding if they are undefined. This means --weaken-symbol=globalundef will do
nothing. For llvm-objcopy, if a symbol is explicitly requested by
--weaken-symbol it goes ahead with it, even for undefined symbols. This seems
like a reasonable thing to do on the surface - the user has asked to do
something so we should let them (plus there's no other way to convert a global
undef to a weak). However, it gets more complicated when you consider
interactions with --regex and --wildcard: it a user specifies
--weaken-symbol=.*, should it change weak undefined symbols? If there are any
undefined symbols, they'll become weak undefined symbols, which means there may
be problems at link time.
What do people think? I'm inclined to leave this difference in place, but am
happy to here the opinions of others.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs