From patchwork Thu May 5 06:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 53493 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F5A4395381E for ; Thu, 5 May 2022 07:01:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F5A4395381E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651734068; bh=N45MuaSrFJjz2HBgqxS90PzfUuyqlkvFmWor5LS+SEI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pP5p1kHpH9fZBoJUG/VsknoIUng2qbBy8kN2gpUupUyILSqPpruPllHu8uZocMACN o6S3wqumXlgJB/8reU3HGM+DyJBZbhwfdHIzKUA1C9R+QKNHaLzRR3ZeS23tczjl+B QIky2Wy9UiNYOb9lZltmPLc83nhQ/FDTJXvQVEFE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10069.outbound.protection.outlook.com [40.107.1.69]) by sourceware.org (Postfix) with ESMTPS id 7061E3856DD7 for ; Thu, 5 May 2022 06:59:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7061E3856DD7 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=OWRP92QaAKxZpHz0/XY49k+qi/CPFycqerArHDQ2uwO27O60GAsNgGAmTmGUrFa1ZcU0lQJM8MfL+uJLSwRfS/9CuC/jgog5h3G6zPOIukaB1+r+96Qgmm0OKs6goGpYnxO/Qo5fVBMw18Kh5PWSgvKYqNlo+9YtF/BIJw0xVnJ2dKsiHyt/7RX7nHBdpLezypWOZuekb2mLELUvb8hjQe8m6QWIY3mQgDoJBs2/mJRsBel17qz6rcuQ6DqsZO2/iFhcf0mQ6IZ8tEmVYnUPAHCeaFiz1Hzfz/DPIOJd0Y1rrXlxSDRyEgzbDTi9mStEXj0Ag4zMncvh1D91badHNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N45MuaSrFJjz2HBgqxS90PzfUuyqlkvFmWor5LS+SEI=; b=e3RJhHiAMrUIZFfkjMqyzsNU5DcbiI0pCFhGIUL/i0M/PfFuc/hCS7bk/yR9LAzUBhPBpdJK3ZdM21/KcEpdgI8xTTrx0CvdVgR3oE5qnVCGNnoe9y0T3qeItiqP5KEBd2MDdh5tlytK3wYeimUj9/OgBnwR5zvemLRurrfaW+z1Dt0b3IpjuiXURj6UpwJASuz4litqYxlf/L8Vm8o4mhiW328nkBYv3r/kHdLwd9tU2SkAj6DEgKZyah/c8xZVsNyhF+hjZvYArbnqvDNNlPQNrOpcCKz7KojTVec0Ai+ds3d5ggFGB8n5ix8uKmNAbQki46/vnKxLz/3Xh1bTvA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.com]) Received: from AM6P192CA0043.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::20) by VI1PR08MB2880.eurprd08.prod.outlook.com (2603:10a6:802:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.25; Thu, 5 May 2022 06:59:06 +0000 Received: from AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:82:cafe::b5) by AM6P192CA0043.outlook.office365.com (2603:10a6:209:82::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.12 via Frontend Transport; Thu, 5 May 2022 06:59:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT016.mail.protection.outlook.com (10.152.16.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Thu, 5 May 2022 06:59:06 +0000 Received: ("Tessian outbound 2d401af10eb3:v118"); Thu, 05 May 2022 06:59:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3fd3ee6faef46f80 X-CR-MTA-TID: 64aa7808 Received: from 043f49dda3da.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 933A0655-9F37-4FE7-B8EE-45BCA5BB16F7.1; Thu, 05 May 2022 06:58:59 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 043f49dda3da.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 May 2022 06:58:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QrnJtAOwpAJZGcXXhCOIt0hf+xt8beRZFCdqk/xmbcbQBwJSxeiuX678Kiu6yvSsKv6jOkBnWBE71S3fhOhY/9l/1sfV76MdZgzI+LizO8M6Nz66eEy5NUh6wlHKJE8nthDAio8a6VbHkPNHoYE46mPfxBq53KsCDWjTjU63TuOTpy2V7XoKXGsq8FSDPLwG1C0cg0mXQozTpwtSMSJiBsicOMMX//II8J+dy4KDW276hyBYULGIlnVCwkTw9QS14nDUb0xyEEtsjM6OsyEXxicjNbbUyT9fMLyZ4ZxqOzgP4UEkN1TSbSTBsV0T9lbkSHsDKV2SHpRjQf2P6tDVfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N45MuaSrFJjz2HBgqxS90PzfUuyqlkvFmWor5LS+SEI=; b=ARVgOTSBspTuRdCzFxbVnBTAE78nR1Gz+xFfXEOfQUJk2CV80HL4M/MfNttQqYuUL6tET6KWVArsEKSXHkSTaFzNCLKLu/27yICVgdMLCtvLkkdggWew6/RGq58i9cXgYXEq+manDa42t4OLiVPgjGT04sqnsQwYfrHVE7bCrhA0ZXPznbh7WrivfDWRqmAwmtkagVxM9fWb+Qe2yMe0AxJ/o2/W8X/arxEK9xNEiv5Hy0vigrepWGAU6n37UPVLNGr8GUlhs4c82clSnkmOOpMgK9oxQAO+EjaLnsXR/Jy+hj94rYhF+k7+wb7alRZh9D4itVbgNE1HzjC6KsIFQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6P195CA0043.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:87::20) by AS8PR08MB6994.eurprd08.prod.outlook.com (2603:10a6:20b:34c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.12; Thu, 5 May 2022 06:58:58 +0000 Received: from VE1EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:87:cafe::45) by AM6P195CA0043.outlook.office365.com (2603:10a6:209:87::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13 via Frontend Transport; Thu, 5 May 2022 06:58:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT027.mail.protection.outlook.com (10.152.18.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5227.15 via Frontend Transport; Thu, 5 May 2022 06:58:57 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 5 May 2022 06:59:01 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.27 via Frontend Transport; Thu, 5 May 2022 06:59:00 +0000 To: Subject: [PATCH v5 2/4] rtld: Remove DL_ARGV_NOT_RELRO Date: Thu, 5 May 2022 07:58:56 +0100 Message-ID: <8db827d67ca16fee222c832d5dcdc7fcbb51323c.1651732417.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 427e4fd2-b520-4bee-ad2f-08da2e64bf02 X-MS-TrafficTypeDiagnostic: AS8PR08MB6994:EE_|AM5EUR03FT016:EE_|VI1PR08MB2880:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: PxXwY/gruMt4ZGIpeSAUVCn3aQ9XR8zeg/bOtjjKzByu7RZ885vBcZqfz8uZ6y2a2FPOna4ybjBC5IrsWX4lrsJIs0/5F6y3VwfJ1728y8878q8/2AmI+Zso0qmjhKFQHtULLLvWvbSN402b76q7AnsyqPyZHslxO72HWK5+xYElq0hotJASL8j6FiS7KTS+fSPsuR0zxlEBFm4YhEnBI0eBWi9FMgzYVkKntTt7sgFMhB2UDHTescJmU/r4G3EvHzHFIiQsG6kO58//8F7O0LLLytul2zgBZaPb9H9a4bCcGPXnUFkin3h8+chPdYVjeiwwG6goSsc2F093vWTKEVz0J+yl6kJhS1Iza+hiip5NLrBIjacO1LtvKWSIAKlcTiPfaJ7nM2wBDec+giNDOuYRHF7fxx5tzkFxnoBMAYAfpJLUxfYwC5FXH8SS51AwxSi0E4hbwKOmdEdRtrmzRvOZhtRhMw9JvmcMiZxGNWDTri/zgLpPj5qKvhfEk5ILonFP+h29DFBXFKjIriwPSSyZlN0JMXvPf9PrivfzNh/B1Zv0EXxGRcOdks6FZZLYvGVlUCtqppDqQ6TjMshB9y71o5Q7X0VzUcKKHXHFoXXqTbUOMKvb39lLgRARaLU68IY07K5/rx85SoqTIZ3u3uswCGSaYp/JQ9rG4J/DWCy9oIWsAkqUBP6PwrrahfVv6c8iZaWuvNw03g1NUR9o5gjvEnF1UcRGSVqX/5cvQG/sEQRcf9l0KWNdoABkAgf5eQy0OQQ/jMrpEDHrpcUpy84YyRrCLu0BHzsxXg23a+h/ay0MDw8pg92YXEm7ny0H X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(7696005)(36860700001)(83380400001)(6916009)(2906002)(508600001)(70586007)(4326008)(40460700003)(86362001)(70206006)(44832011)(8676002)(8936002)(26005)(6666004)(5660300002)(316002)(30864003)(186003)(81166007)(82310400005)(426003)(336012)(36756003)(47076005)(356005)(2616005)(2004002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6994 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 57cac17f-6f17-47d2-8819-08da2e64b9da X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I/8oNeAdxsHXnwJQytgaN/QVEYjHUOQia4Q3phbC6u7KkmuhKiTcwJuDQZRoMS143e8VxM36zlVR2z0d4WCOz0vV9wzQdaHVGDWIwDEFm0e4Yf13RTLLDwvQZ7fKaRkzQi8ivqKksi5xc3RhkHJAymIpSfw61+cZCjRcLQ3pkcefjNsbDp+Y+SFvy0JKwwPp0ccwrkV+Kf6cgKHlejfeRjBSS93CtqBh9XAGSO1VJeeKHPH154LohDfs85iTPQI5OaY//ygnF1I5U6ND+mejSY/XvVOJUSPqsNbI9TvIl1B2TdlG/2IMObX1IBhRXKWFEIcN45rhiVxMQuRyCdJePdeHXSOVYZyzr1wOKQmPZ6SDrujiTxrJzTUp0cdbd8jKv3CW2+ZSHQd1oFFvXaljQrBytrfi0H0vj4N9D9pGHRWZ6vaB9ifMHiqoNNX6eCKZbVU1xgSN0Uki/KGrWmC2YIC2qeBolQnMx3TbuFzw9NK1HDEVay/t2AdEBvt340DWgvZk5c2HCy5YMaoATh4U1KerhMzF2ri9s6cptKhC1dR1w1Mc+uUckzEc81FBa84Wy+GP3GAx2y6nCfQ/zesK27dE3af840btO4CzxJaa5gXUr8MfRr7OWsX121GQbgT/bvbz6i+ogIuhpP2T2t4yXLlwjPcfqGgxfDhxLMJc+6wT4F7ErJ8AvN+X5KnmTjpSrhwRawfaB0w0Nf82gcnUgjJyRACDg8Id4N94bFTTz9h1Wzwo6fdhFkY3RCebKD313KCq4B3y6bSqz9b3HQIC6PCqpTeAva90GI8owrQbmZQ= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(508600001)(81166007)(86362001)(8936002)(44832011)(30864003)(5660300002)(2906002)(36756003)(186003)(426003)(2616005)(336012)(7696005)(6666004)(47076005)(82310400005)(107886003)(40460700003)(26005)(83380400001)(36860700001)(6916009)(316002)(8676002)(4326008)(70586007)(70206006)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 06:59:06.1796 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 427e4fd2-b520-4bee-ad2f-08da2e64bf02 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2880 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Cc: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This is no longer needed because _dl_skip_args is always 0, so the target specific code that modifies argv after relro protection is applied is no longer used. After the patch relro protection is applied to _dl_argv consistently on all targets. Reviewed-by: Florian Weimer Tested-by: Florian Weimer --- v4: - New patch. --- elf/rtld.c | 7 ------- sysdeps/aarch64/dl-sysdep.h | 4 ---- sysdeps/alpha/dl-sysdep.h | 23 ----------------------- sysdeps/arc/dl-sysdep.h | 4 ---- sysdeps/arm/dl-sysdep.h | 4 ---- sysdeps/csky/dl-sysdep.h | 23 ----------------------- sysdeps/generic/ldsodefs.h | 12 ++---------- sysdeps/ia64/dl-sysdep.h | 23 ----------------------- sysdeps/nios2/dl-sysdep.h | 4 ---- sysdeps/s390/s390-32/dl-sysdep.h | 23 ----------------------- sysdeps/sparc/dl-sysdep.h | 23 ----------------------- sysdeps/unix/sysv/linux/ia64/dl-sysdep.h | 4 ---- 12 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 sysdeps/alpha/dl-sysdep.h delete mode 100644 sysdeps/csky/dl-sysdep.h delete mode 100644 sysdeps/ia64/dl-sysdep.h delete mode 100644 sysdeps/s390/s390-32/dl-sysdep.h delete mode 100644 sysdeps/sparc/dl-sysdep.h diff --git a/elf/rtld.c b/elf/rtld.c index d959dab0d0..afff1b87fa 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -157,16 +157,9 @@ static void dl_main_state_init (struct dl_main_state *state); extern char **_environ attribute_hidden; static void process_envvars (struct dl_main_state *state); -#ifdef DL_ARGV_NOT_RELRO -int _dl_argc attribute_hidden; -char **_dl_argv = NULL; -/* Nonzero if we were run directly. */ -unsigned int _dl_skip_args attribute_hidden; -#else int _dl_argc attribute_relro attribute_hidden; char **_dl_argv attribute_relro = NULL; unsigned int _dl_skip_args attribute_relro attribute_hidden; -#endif rtld_hidden_data_def (_dl_argv) #ifndef THREAD_SET_STACK_GUARD diff --git a/sysdeps/aarch64/dl-sysdep.h b/sysdeps/aarch64/dl-sysdep.h index 667786671c..1516dd7d3f 100644 --- a/sysdeps/aarch64/dl-sysdep.h +++ b/sysdeps/aarch64/dl-sysdep.h @@ -18,8 +18,4 @@ #include_next -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - #define DL_EXTERN_PROTECTED_DATA diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h deleted file mode 100644 index 3099ee419f..0000000000 --- a/sysdeps/alpha/dl-sysdep.h +++ /dev/null @@ -1,23 +0,0 @@ -/* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include_next - -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/arc/dl-sysdep.h b/sysdeps/arc/dl-sysdep.h index da060ceeee..cf4d160a73 100644 --- a/sysdeps/arc/dl-sysdep.h +++ b/sysdeps/arc/dl-sysdep.h @@ -18,8 +18,4 @@ #include_next -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - #define DL_EXTERN_PROTECTED_DATA diff --git a/sysdeps/arm/dl-sysdep.h b/sysdeps/arm/dl-sysdep.h index ce7a84a7de..7a99107436 100644 --- a/sysdeps/arm/dl-sysdep.h +++ b/sysdeps/arm/dl-sysdep.h @@ -18,8 +18,4 @@ #include_next -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - #define DL_EXTERN_PROTECTED_DATA diff --git a/sysdeps/csky/dl-sysdep.h b/sysdeps/csky/dl-sysdep.h deleted file mode 100644 index fc8a58b94c..0000000000 --- a/sysdeps/csky/dl-sysdep.h +++ /dev/null @@ -1,23 +0,0 @@ -/* System-specific settings for dynamic linker code. C-SKY version. - Copyright (C) 2018-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include_next - -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 31de149f23..e3c4d09bc6 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -762,18 +762,10 @@ rtld_hidden_proto (__libc_stack_end) /* Parameters passed to the dynamic linker. */ extern int _dl_argc attribute_hidden attribute_relro; -extern char **_dl_argv -#ifndef DL_ARGV_NOT_RELRO - attribute_relro -#endif - ; +extern char **_dl_argv attribute_relro; rtld_hidden_proto (_dl_argv) #if IS_IN (rtld) -extern unsigned int _dl_skip_args attribute_hidden -# ifndef DL_ARGV_NOT_RELRO - attribute_relro -# endif - ; +extern unsigned int _dl_skip_args attribute_hidden attribute_relro; #endif #define rtld_progname _dl_argv[0] diff --git a/sysdeps/ia64/dl-sysdep.h b/sysdeps/ia64/dl-sysdep.h deleted file mode 100644 index e3a58bec24..0000000000 --- a/sysdeps/ia64/dl-sysdep.h +++ /dev/null @@ -1,23 +0,0 @@ -/* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2002-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include_next - -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/nios2/dl-sysdep.h b/sysdeps/nios2/dl-sysdep.h index 0354650042..257b37c258 100644 --- a/sysdeps/nios2/dl-sysdep.h +++ b/sysdeps/nios2/dl-sysdep.h @@ -18,8 +18,4 @@ #include_next -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - #define DL_EXTERN_PROTECTED_DATA diff --git a/sysdeps/s390/s390-32/dl-sysdep.h b/sysdeps/s390/s390-32/dl-sysdep.h deleted file mode 100644 index 699b50f156..0000000000 --- a/sysdeps/s390/s390-32/dl-sysdep.h +++ /dev/null @@ -1,23 +0,0 @@ -/* System-specific settings for dynamic linker code. S/390 version. - Copyright (C) 2014-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include_next - -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/sparc/dl-sysdep.h b/sysdeps/sparc/dl-sysdep.h deleted file mode 100644 index f32f16a107..0000000000 --- a/sysdeps/sparc/dl-sysdep.h +++ /dev/null @@ -1,23 +0,0 @@ -/* System-specific settings for dynamic linker code. SPARC version. - Copyright (C) 2002-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include_next - -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h index 0d2a1d093a..aa1de6b361 100644 --- a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h @@ -48,8 +48,4 @@ extern int _dl_sysinfo_break attribute_hidden; ".previous"); #endif -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - #endif /* dl-sysdep.h */