57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
commit a0f9bfc3a5cc10920787d70d0653720a8fa013f3
|
|
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
Date: Mon Nov 6 17:25:48 2023 -0300
|
|
|
|
elf: Remove any_debug from dl_main_state
|
|
|
|
Its usage can be implied by the GLRO(dl_debug_mask).
|
|
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
|
|
Conflicts:
|
|
elf/dl-main.h
|
|
(fixup context)
|
|
|
|
diff --git a/elf/dl-main.h b/elf/dl-main.h
|
|
index d3820e0063143878..35728d47d463c3fb 100644
|
|
--- a/elf/dl-main.h
|
|
+++ b/elf/dl-main.h
|
|
@@ -94,9 +94,6 @@ struct dl_main_state
|
|
|
|
enum rtld_mode mode;
|
|
|
|
- /* True if any of the debugging options is enabled. */
|
|
- bool any_debug;
|
|
-
|
|
/* True if information about versions has to be printed. */
|
|
bool version_info;
|
|
};
|
|
diff --git a/elf/rtld.c b/elf/rtld.c
|
|
index b788857924e5a388..629ad7f8f4f75353 100644
|
|
--- a/elf/rtld.c
|
|
+++ b/elf/rtld.c
|
|
@@ -305,7 +305,6 @@ dl_main_state_init (struct dl_main_state *state)
|
|
state->glibc_hwcaps_prepend = NULL;
|
|
state->glibc_hwcaps_mask = NULL;
|
|
state->mode = rtld_mode_normal;
|
|
- state->any_debug = false;
|
|
state->version_info = false;
|
|
}
|
|
|
|
@@ -2707,7 +2706,6 @@ process_dl_debug (struct dl_main_state *state, const char *dl_debug)
|
|
&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
|
|
{
|
|
GLRO(dl_debug_mask) |= debopts[cnt].mask;
|
|
- state->any_debug = true;
|
|
break;
|
|
}
|
|
|
|
@@ -2954,7 +2952,7 @@ process_envvars (struct dl_main_state *state)
|
|
/* If we have to run the dynamic linker in debugging mode and the
|
|
LD_DEBUG_OUTPUT environment variable is given, we write the debug
|
|
messages to this file. */
|
|
- else if (state->any_debug && debug_output != NULL)
|
|
+ else if (GLRO(dl_debug_mask) != 0 && debug_output != NULL)
|
|
{
|
|
const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW;
|
|
size_t name_len = strlen (debug_output);
|