[Bug 658851] _dl_debug_state() RT_CONSISTENT called too early

bugzilla at redhat.com bugzilla at redhat.com
Sun Mar 13 13:28:44 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=658851

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat.com> 2011-03-13 09:28:39 EDT ---
Implementation plan:

http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c4
suggests GDB `stop-on-solib-events' should stop before STT_GNU_IFUNC entries.
But those are currently never resolved during solib load, filed:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=12575
If the PR 12575 gets fixed then GDB should put a breakpoint also at the first
STT_GNU_IFUNC entry.  Without the PR 12575 fix the general GDB implementation
plan is the same, just the first STT_GNU_IFUNC entry breakpoint would never
get used.

Without fixing PR 12575 it would be IMO best to fix this whole issues at the 
glibc side to make its behavior compatible with the original Solaris linker as
described at
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c3
But such change has been rejected for glibc-to-glibc compatibility reasons in
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c6
and after fixing PR 12575 it would no longer be useful anyway.

For the case -Wl,-z,now/RTLD_NOW/LD_BIND_NOW is not in effect the breakpoint
should be put at DT_INIT or the first entry of DT_INIT_ARRAY, as called by
glibc `call_init'.  A single breakpoint on first such entry point is enough.

If there is no DT_INIT/DT_INIT_ARRAY then GDB should stop straight at 
`_dl_debug_state'.

GDB needs to consider all the newly found solibs as `_dl_debug_state' does not
provide which solib(s) has/have been loaded during RT_ADD.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the triage mailing list