Re: Disabling string table optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux