1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

malloc: Remove LD_TRACE_PRELINKING usage from mtrace

The fix for BZ#22716 replacde LD_TRACE_LOADED_OBJECTS with
LD_TRACE_PRELINKING so mtrace could record executable address
position.

To provide the same information, LD_TRACE_LOADED_OBJECTS is
extended where a value or '2' also prints the executable address
as well.  It avoid adding another loader environment variable
to be used solely for mtrace.  The vDSO will be printed as
a default library (with '=>' pointing the same name), which is
ok since both mtrace and ldd already handles it.

The mtrace script is changed to also parse the new format.  To
correctly support PIE and non-PIE executables, both the default
mtrace address and the one calculated as used (it fixes mtrace
for non-PIE exectuable as for BZ#22716 for PIE).

Checked on x86_64-linux-gnu.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Adhemerval Zanella
2022-01-21 10:20:50 -03:00
parent 6628c742b2
commit d7703d3176
4 changed files with 51 additions and 33 deletions

View File

@@ -94,6 +94,9 @@ struct dl_main_state
enum rtld_mode mode;
/* True if program should be also printed for rtld_mode_trace. */
bool mode_trace_program;
/* True if any of the debugging options is enabled. */
bool any_debug;