This is the mail archive of the
mailing list for the binutils project.
objcopy does not affect STB_GNU_UNIQUE symbols
- From: Mark Hills <mark dot hills at framestore dot com>
- To: binutils at sourceware dot org
- Date: Wed, 13 Jul 2016 17:48:22 +0100 (BST)
- Subject: objcopy does not affect STB_GNU_UNIQUE symbols
- Authentication-results: sourceware.org; auth=none
We are making extensive use of partial linking to ring-fence portions of a
large application and its plugins in a controlled manner.
We've hit globally unique (STB_GNU_UNIQUE) that result from libstdc++
libraries (tested gcc 5.3.0)
But these are untouched by any of the objcopy flags; eg.
objcopy -L '*'
objcopy -L _ZNSt10moneypunctIwLb0EE2idE
which the manual states localises all symbols, but in practice does not
affect the UNIQUE ones (tested binutils 2.25)
$ readelf -W -a partial.o | grep _ZNSt10moneypunctIwLb0EE2idE
27943: 0000000000000000 8 OBJECT UNIQUE HIDDEN 19194 _ZNSt10moneypunctIwLb0EE2idE
I expect the developers of libstdc++ have their reasons for these to be
process-wide, but our requirement is to control the scope just as we are
already able to do with GLOBAL symbols.
How can we manipulate these symbol definitions? Or localise them at
I've found references that it's possible to build the compiler to not emit
these symbols  however that is rather unweildy solution.