This is the mail archive of the
mailing list for the binutils project.
Disabling the combination of duplicated string table items
- From: pmon mail <pmon dot mail at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 14 Aug 2012 16:26:29 +0300
- Subject: Disabling the combination of duplicated string table items
I have a problem with string table optimization with ld.
I have an object file with two function symbol entries: "foo" and
"myfoo". There are obviously two items in the ".symtab" section for
them and two respective complete null terminated strings in the string
I link this object file to shared library with the command:
ld -shared foo.o -o foo.so
When look at the shared library, I see that the ".dynsym" still
contains two items for the two functions, but the ".dynstr" table has
one entry for them "myfoo" and the "foo" symbol uses the index of "f".
This is a neat optimization, but it causes me problems.
Do you have idea how I can disable this merge/combination
optimization? I would like to have two string table items for the two
symbol table items.
I have been told to try "--traditional-format" option with ld, but it
doesn't seem to have any effect on the output.