From patchwork Tue Oct 17 13:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 734396 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp469780wro; Tue, 17 Oct 2023 06:08:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXUYAVRMQ50Oq2i+1hPIEpQbQ8y+28O8+TuX995Fzv+1ku9jDWJeCL6HlBiuJNIKH0uA1G X-Received: by 2002:a81:490b:0:b0:5a8:3f2:b538 with SMTP id w11-20020a81490b000000b005a803f2b538mr2184679ywa.37.1697548119475; Tue, 17 Oct 2023 06:08:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697548119; cv=pass; d=google.com; s=arc-20160816; b=s8IwevXTuEI0OvsNGxv7jPHwxDiWTUVy+ProXS/A7qRepk1D7oHFv6dLIdRdTgtaRY 4cFsGZ7PlNIe3XfLbxXGQgOopMVKns06u2uC86yw2aIuw7JPbtk+AjtjEq7D9OWbz5F9 Cq3fygqBezRh5Wj3Si8A61N4GmRZVsTn+Z5Oxw5KpsJnz3CmFjVTl79nisVfVpvaaeHf CygtZo+0ZAH7QAoCCWVtNlTcMnC/vTQii5TVhioc4g6geXET1yN/7pqNC3EsOo4oItwa fm/BluYbqBZSBC7IFIzow1/eySgwt29ZFv3mKE3g4uhIvm/AO/qJbp+Qb+RJRTVDh3tn WLAg== 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=isKyW//JpDhnHGHKbLaETH/dG2pKDaCaeBKdwZnjm40=; fh=+FUb54tScwW7D3lvWhZcQBi30wyNNn2DusdH7ahfqKk=; b=PE6N9a7Pd8R7uriPB+xziqa5L/92p21Lzp3BtD8K3uxGYcBKaLISOxxj1wsZOOcd/Z PcAu79KOpwgbB5ZnqlQtzySljthflNXRD848sU8ovWZX2dW8qqCkrRMAm92AwWo3/o/t 5qE97BeJin4JxOpOZf7Qk6ImfhFWgpfyYkxUgsUChCQapP6ft4tHDDu0lp7zynxEi7bG 0yXghReCgP94cxAMwNZngNmKQ+eRA0KHt78I8ytC0O7Ya5yy4SMjUlpIbMDAwrhns0HO TwcR90x1zk53VMdDcBrEU7QB7nhayxKgdbQO6AZT8B18bmbAUJAIP/hBlAbpRnthUL8k 125Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OH6dhORk; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f23-20020ab02e97000000b007abac3e9cf8si139596uaa.115.2023.10.17.06.08.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:08:39 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OH6dhORk; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 807F0382D35F for ; Tue, 17 Oct 2023 13:08:12 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 5BACA385802F for ; Tue, 17 Oct 2023 13:06:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BACA385802F 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 5BACA385802F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::434 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697548010; cv=none; b=VQexvn+Rz5cPNKl9+v7yumxVKUfg5neu0BPZKRdtA31uoRTcAujW7PvUACnS7kQiIMmR9a5W+9ERCrr05AWo7R9DuLnXyRZH6kBlERuC8gCIYIlUluONV9oI6QxnFhEqrT5SDsqtbm5l8TOjy6YsGXswCumcVTgVa5Z6YBiNS5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697548010; c=relaxed/simple; bh=J5EsF5ZQTqxtd5tTKAdj0+NxmCREa3YEkD12XrYFA+w=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Js0IB/56am383A1zefnGIJkdu21a6FAFPKApm7OwWa2W3Fj04IoV0es/XO6x5QKSnkQv8SX67wU2dGpJOIM/SLE80TOYaqU7oVkSwz5K/7iTXF9SnqktDiFBuqomusxETbh5K1REsopSe5jnAEiydXeqlB91TyesU2xAB7GKAsw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6b5e6301a19so3443365b3a.0 for ; Tue, 17 Oct 2023 06:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697548007; x=1698152807; 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=isKyW//JpDhnHGHKbLaETH/dG2pKDaCaeBKdwZnjm40=; b=OH6dhORkmxepYVxuERtGAxcRrPfhpgpBX5pe173TPzkqL+xFpGoGk3ahzefNwiiVC1 ZdTwsznBfp/CNxfYWLjxZmtucloap5BMnair3Ms4Gd7Ig1hAUZZZD992gizilwpD3Fn7 qZ6PaPt5rb83QYxLJQ+LAZQFEMC3jLKyj50OZjBR53641PbZtEIy56pliHf/k+Vg6aRW 5O+gmcxLsRHa/11tErBj7jZNpvGw5k2SM6khPES6H+yoPSxXMWane37NjFYqHUbgiMJ1 sFqYnSfFIV17SJ5dfWA4yu5LANOY4iNnfwoVEAQpL9mNnSJr35TW54xZEar5K08CjQiL J2Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697548007; x=1698152807; 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=isKyW//JpDhnHGHKbLaETH/dG2pKDaCaeBKdwZnjm40=; b=n2+Z2BMrjRO1juFh3W1Addee/ppPJNpEO5ANhnVhQbjp8F/LAAINQP7uV/weosFub7 b1pRLof9PdIuMQGseglqGwD6vjev8jTgk2+8k6H0GkiiUDUL81uNUMbpzfMhZDTou+4b HSzWNAvNuwhBUZd8ALVHmBB4KRWUUOoiy2QEb/MhPaELY8C61E92bQi4+/rUD7pc8aOU N1zGmNXOOOZpyEt+bJfaiwmIm5GSIE1hiiJ23An6TfT9ohvaKBK8svGEUSxBl3JIyeTe IFA+oF+WW28fn5FJDcZYdOEV6zrcPOFv3Fdc0ckORc7oIw3sayfRTRvz5aG6ROE84MFA QD8w== X-Gm-Message-State: AOJu0YymXTR7bbHuyDaI5dW+T6lBVT74OBnFVg8vUFyXv0b8GuONKANK 5FQPIMB9jkNQoO686KVd8ryBYcnUjQpU96C99TDDPg== X-Received: by 2002:a05:6a20:7f8e:b0:136:faec:a7dc with SMTP id d14-20020a056a207f8e00b00136faeca7dcmr2681552pzj.11.1697548003516; Tue, 17 Oct 2023 06:06:43 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:7f2e:11d:92b4:4d78:4197]) by smtp.gmail.com with ESMTPSA id l28-20020a635b5c000000b0056b6d1ac949sm1309788pgm.13.2023.10.17.06.06.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:06:43 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Siddhesh Poyarekar Subject: [PATCH v2 15/19] elf: Remove any_debug from dl_main_state Date: Tue, 17 Oct 2023 10:05:22 -0300 Message-Id: <20231017130526.2216827-16-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017130526.2216827-1-adhemerval.zanella@linaro.org> References: <20231017130526.2216827-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 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 autolearn=ham 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). --- elf/dl-main.h | 3 --- elf/rtld.c | 6 ++---- 2 files changed, 2 insertions(+), 7 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 8749ad6288..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; } @@ -2552,7 +2550,7 @@ process_envvars (struct dl_main_state *state) { case 4: /* Warning level, verbose or not. */ - if (!!__libc_enable_secure + if (!__libc_enable_secure && memcmp (envline, "WARN", 4) == 0) GLRO(dl_verbose) = envline[5] != '\0'; 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);