same symbol appearing many times in executable

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

 



Hi,

I have inline functions in header files defined as static inline.

I see multiple instances of the same symbol in the final executable. I
am suprised because I would expect them to not appear at all, if
compiler chose to inline them. If it did not choose to inline, I would
expect it to appear only once. This is because even though each instance
would be available in every .o file including the header, during the
final link they should have been reduced to one instance.

I have observed that going further in the file, further references to
the function uses the later occurrences of the symbol. So this made me
thing it's an optimization to do relative jumps, e.g. if the symbol was
too far to refer directly, new local copies might have been created. Is
this possible? But then, I wouldn't expect these copies to have exact
same name of the symbol.

Any idea what I am doing wrong?

-- 
Bahadir Balban



[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