Disabling string table optimization
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Aug 14 14:57:00 GMT 2012
On 14 August 2012 06:33, pmon mail wrote:
> Hi
>
> Consider the following C code:
>
> int myfoo(void) {
> ...
> }
>
> int foo(void) {
> ...
> }
>
> If I look at the string table (.strtab) of the object file after
> compiling this C code I will see only the string "myfoo", while the
> symbol table will have two entries for two functions but different
> index of the function name. The first will point to the letter 'm' and
> the second to 'f'.
>
> This is a neat optimization. The question is can it be disabled so I
> will get two entries in the string table, one for each function?
I think that's done by the linker, not GCC
See http://sourceware.org/binutils/docs-2.22/ld/Options.html#index-traditional-format-232
but I don't know if that always changes the string table optimization.
>
> Thx,
> pM0n
More information about the Gcc-help
mailing list