From patchwork Mon Nov 6 20:25:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 741469 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1295171wrr; Mon, 6 Nov 2023 12:28:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8WYqCmL4+EPJ8zfjIYFAe42HfTovi1XrgP5OavUJvCC0J8ybcV3/KZ8Oxma4fN3JzyJ2u X-Received: by 2002:a05:622a:5c9:b0:413:5d52:ee17 with SMTP id d9-20020a05622a05c900b004135d52ee17mr34673691qtb.42.1699302525855; Mon, 06 Nov 2023 12:28:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699302525; cv=pass; d=google.com; s=arc-20160816; b=Mvp2rvYYs0MSBcupQIRqY9rMhMImjyPj9OEy6t6Z6Bn1AU9f+s1euuFHhvzAjIuD0J StaWYWZaaXEcVRaowPgaN8x2oIjvC0cYwQE/MX2/sdZD5plKm9UiHp4QypcoeUT4U9nK H7PX3Y5n5MUhSGuvxyTKVftd5/8xUhAZgGz3hnDhhW9q9oRvGup7EmfyOmyqZxsDGOVw pWzMz8hivluAud7+4ODXammeO2lJBMo0qPeA/mHkeJzOxjJqtpAlWOR8CyPVVR5PmYjt Ctl5O3qjcOao0r7Zj4++Eit5wA+kIB9GNZmQ9Fsfj8NLOMmTv8HjmyPGP/p7UVkcA99M B2WA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=8h/4PodaqIbp3uLPno0zGPmFmcClBpzPYmD31zeKfwI=; fh=+FUb54tScwW7D3lvWhZcQBi30wyNNn2DusdH7ahfqKk=; b=lWLwYDpCJeQ0f52dmcdMkUaMxpy4wVAQBlEh6G80Z6UpSz9DSrxBDJHdZV2aLoXTW6 9kMiqEL3x63xbk4pbokMwU2C4hBuncvngKTS57MnLFm2oH71aKBfiAAwtB1OC3xH8ePg dXoEBA3swjP3+2JV4fM/idyRaczgtzHaHt5vNYsLP7tqeaUTqUzIJPmwGUJsDtJM4c/Y mrHglNLpGPv/k893YvXzyZNyfrO2UcgOLvLV9po5vpVAXY6XGncTDUa7j4B1agdnc55q zA6errG7eUFjw3i2mgJSdr/roBh/IcGlWkenlLIjrsvgDQJPu+DRTdwYA3lwRkdt7Cxi E4Vw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j6RwCEhC; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w5-20020a05622a190500b0041812c64665si5971332qtc.793.2023.11.06.12.28.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:28:45 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j6RwCEhC; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 864AA3858CDB for ; Mon, 6 Nov 2023 20:28:45 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by sourceware.org (Postfix) with ESMTPS id 63CB53856275 for ; Mon, 6 Nov 2023 20:26:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63CB53856275 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 63CB53856275 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::112e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699302390; cv=none; b=uDvjgCHFafGsAaPNXN52LC8kmEWRY8OQOnagsHSN6uhhnFZoUmqYAWtXHww4S80rJPLrPwGOxxO5fWYeLyVL9Teg+NkBSMJ1csO22faPDfh+oJPwxAzr7OCBTpu9Aw1bX8BR60U1taXweVwWDYgDrgzB+DCLFqg2CVr17LXdFwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699302390; c=relaxed/simple; bh=4mFsdvrMOZGsOyh4p2MF9I34BqNomevNYLRf1WPeRIk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=cb5FZ/zQ6294Pgj1oRaYckWAKjOy7xlUJFKwBUwgxtyHpQHWq4f9SthP2zcWwxPKDtFDZrpaXVQ29zx2Wh9SEb0vmvIeuqzbDyNdLPaHFf9xg+/3tJS24wvOB17WFwIDyLRibzK2MLMrgFCB92OzZpIERYk0uwS0afTOx7WPWtk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-5a8ee23f043so57451597b3.3 for ; Mon, 06 Nov 2023 12:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699302388; x=1699907188; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8h/4PodaqIbp3uLPno0zGPmFmcClBpzPYmD31zeKfwI=; b=j6RwCEhCjSOr0jk6aTBlGzq4V0KJBkn2VBYloh+/B/44TdiDyBIQiG8PXwVCuRL46e To70um1OUEh0TP0uagB2exuMUxN5TUdspT5zjfN9efbeRopxnuKWLx1ZbPwNDlm9qxOR 7zV0iT3RV9bHmZepcztwCm9KId+cD10NmES3h2ZFH343g1lBBx6W8XAUbYzkwwTdgJHI 0MNkeEq4G/bPFgEIKIhk2GfsDQQnDDBB/hMpmcAdYSYYKZbjO/jTENXIJv6kY1Wqhamt +ro4Q/05QKyMYWS7M0WaeIV00L9DVgcfTX8rRyrLjMX6TuXL3jS8ZxM596O2wBOLqzwm kzDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699302388; x=1699907188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8h/4PodaqIbp3uLPno0zGPmFmcClBpzPYmD31zeKfwI=; b=R8Etbk9Qotvpf+A/sROPuVS7I7tl1zAhv8u2MqCrUkA2SFte8ONKuKt7Wak7+r1L6k 3N7kUIDwSAUDR1hPATT7muYtiJJ2GvAuHUbpIuH3j+0auCFFvH/kAISkrKoNemrKSgaI hzrS3sYV/diqRN5uOhqYtc9pGMC546a4nqvsmibY9tfP9E9Mff8IMudGnD/7sMorkAar a396NNkwRDnbgyfPV7NL2p4hLs4NZE52BeRQysZ9PHOo+YnigqO5y/D/w/JU0fkcEJmN SYtr8XpAaaqwSDj1QYsXw5RF9qud8roJn43P6PjjMA/mjY3egB7VbN+pHRqGGH3coL9k zEFw== X-Gm-Message-State: AOJu0YxQezJrDUrWuk7SKJDGro1eU3OilwzO9kMP/QElopR7cp2H0sv3 PBapbOKBCnmnqA6v6YSYqR9tt82gXeZqCGeixXxtsg== X-Received: by 2002:a81:a1d7:0:b0:5a7:fbd5:8c1 with SMTP id y206-20020a81a1d7000000b005a7fbd508c1mr11893847ywg.17.1699302388192; Mon, 06 Nov 2023 12:26:28 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c0:a715:c1a0:7281:6384:2ee9]) by smtp.gmail.com with ESMTPSA id ci7-20020a05690c0a8700b005a7b8fddfedsm4707154ywb.41.2023.11.06.12.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:26:27 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Siddhesh Poyarekar Subject: [PATCH v3 15/19] elf: Remove any_debug from dl_main_state Date: Mon, 6 Nov 2023 17:25:48 -0300 Message-Id: <20231106202552.3404059-16-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106202552.3404059-1-adhemerval.zanella@linaro.org> References: <20231106202552.3404059-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_FILL_THIS_FORM_SHORT, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patch=linaro.org@sourceware.org Its usage can be implied by the GLRO(dl_debug_mask). Reviewed-by: Siddhesh Poyarekar --- elf/dl-main.h | 3 --- elf/rtld.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/elf/dl-main.h b/elf/dl-main.h index 92766d06b4..f876904cb6 100644 --- a/elf/dl-main.h +++ b/elf/dl-main.h @@ -97,9 +97,6 @@ struct dl_main_state /* 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; - /* True if information about versions has to be printed. */ bool version_info; }; diff --git a/elf/rtld.c b/elf/rtld.c index e7f90d37e7..638b019670 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -300,7 +300,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; } @@ -2481,7 +2480,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; } @@ -2682,7 +2680,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);