This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
objcopy --globalize-symbols on MinGW
- From: "Wesley W. Terpstra" <wesley at terpstra dot ca>
- To: binutils at sourceware dot org
- Date: Fri, 26 Sep 2008 13:55:50 +0200
- Subject: objcopy --globalize-symbols on MinGW
Good afternoon,
On ELF, it is possible to change a global symbol to a local one with
objcopy --{localize,globalize}-symbol[s]. COFF on MinGW certainly has
global and local symbols; one can see this by running 'nm' on an
object file containing both static and automatic declarations.
However, the objcopy options appear to have no effect under MinGW (a
bug?). The object file I need to adjust symbol visibility on is the
result of a partial link, so I can't simply make these symbols local
by adding 'static' to the origin C files or the partial link will
fail.
How can I change a global symbol in an object file to a local one with
binutils on MinGW?
Thanks!
PS. I've traced binutils 2.18.50-cvs20080109 (debian mingw package)
and the line 1074 (sym->flags &= ~ (BSF_GLOBAL | BSF_WEAK); does get
run but the result object still has BFS_GLOBAL set. So I suspect this
is a binutils/bfd bug.