[lttng-dev] Problem with UST related to dlload
Paul_Woegerer at mentor.com
Wed May 28 10:14:53 EDT 2014
On 05/28/2014 03:04 PM, Gerlando Falauto wrote:
> So the hidden symbols are *NOT* weak at all (at least with my buggy
> compiler). They are just automagically defined by the linker.
I wrote "weak, in the sense that it can be linked without providing a
See: http://en.wikipedia.org/wiki/Weak_symbol "... When linking a binary
executable, a weakly declared symbol does not need a definition. ...."
> As a matter of fact, I don't think they should have ever been weak in
> the first place. We *WANT* those symbols to exist and be well-defined,
> and we should make sure the linker complies with this requirement, as
> this is crucial to the correct behaviour of lttng-ust.
> If we generate an inconsistency like the above and keep the weak
> attribute, we would end up with code which compiles perfectly but
> still will not work!
> BTW, the only reference I could find to how and why ldd defines those
> symbols for section __start__/__stop__ is , which admittedly
> states: "I couldn't find any formal documentation for this feature,
> only a few obscure mailing list references". :-(
"If an orphaned section's name is representable as a C identifier then
the linker will automatically see PROVIDE
symbols: __start_SECNAME and __stop_SECNAME, where SECNAME is the name
of the section. These indicate the start address and end address of the
orphaned section respectively."
More information about the lttng-dev