From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0A7481F8C6 for ; Tue, 10 Aug 2021 13:49:36 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC461395BC09 for ; Tue, 10 Aug 2021 13:49:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC461395BC09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628603375; bh=alNdZTKiiwPzncY34vPUgh4Bq+lHg4xdO5dL8s/bTlQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=WyS8ms46/QHNXq4laQhW3KgjoJ7myXHBccDYW14+8Bs/NqmKDLRf28ED3bQdvAwBL 0ufrmC9zQJqicQFkbJTTWFt75m/JwiwI3lRKkrDDJCSUg+ICgmZapX2YKo+oJtQkxp /HVcrgYsAsKJDN+zK2DEjXMCDoaBmcrjipTqiwmA= Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70072.outbound.protection.outlook.com [40.107.7.72]) by sourceware.org (Postfix) with ESMTPS id 72E84385801E for ; Tue, 10 Aug 2021 13:49:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72E84385801E Received: from DB6PR0202CA0038.eurprd02.prod.outlook.com (2603:10a6:4:a5::24) by VI1PR0801MB2061.eurprd08.prod.outlook.com (2603:10a6:800:8e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Tue, 10 Aug 2021 13:49:01 +0000 Received: from DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a5:cafe::2c) by DB6PR0202CA0038.outlook.office365.com (2603:10a6:4:a5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16 via Frontend Transport; Tue, 10 Aug 2021 13:49:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; 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 DB5EUR03FT027.mail.protection.outlook.com (10.152.20.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Tue, 10 Aug 2021 13:49:01 +0000 Received: ("Tessian outbound efa8a7456a86:v101"); Tue, 10 Aug 2021 13:49:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b9b2e615d9be4787 X-CR-MTA-TID: 64aa7808 Received: from 9546ce45817a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5234897E-7CCC-4838-99FA-8A31E3E115A4.1; Tue, 10 Aug 2021 13:48:54 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9546ce45817a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 10 Aug 2021 13:48:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FZoFxuRqGqFCXByc9Qpzx58ClDeWtRQwvvsLPVv6akFyFohRwGxvnSE1mT9GD0fQf5fUJsJo4Xpq2tim760v98dmeEaoG5jsiOfRgAkMbx+DxsOUxjo65dEfJ84QoVuLmEzVx/jo763A9ZJXv4Aqe6TC50pYVFsvNnfkM3tDwpAV4CVrfTC3n5Ex9fw98NhBBR6MEYgnAYM9QFs4djXSF8of/BiW8yWY9zsni6mFKxW86mgJ+hdpuQh9ByXAMDm6m76Mk748jw91jeHq9qq7NlVImNNfhIqONOnZQyJbsAmDbpHGo7SBxoYopy3yMOOVm7yBNLHTBY+2GRRweF2/Hw== 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-SenderADCheck; bh=alNdZTKiiwPzncY34vPUgh4Bq+lHg4xdO5dL8s/bTlQ=; b=eCxEoHyBr0jFuFZllbkA05XX3w5KQxXtMJPM1SaFbuhWKIndg3EhB89y9W+gk6FW9/MaBeT4bNqCQ/ObZxt3zXuDTnWC+ih0zxik4ZB/lL7tRMqOSWL4XukYmd6rlyeWyrPrBVlIS+2E+b0DYiyPGYLb74mE8nsm3yHGSjMzf25n8MOC9pl7943eU4/M2Zc1wIfOBuZEH8ATwC3TRF6aGvbmxpw7SRj18Sk7nc8BPjKRII3B2vQLayelQZQa0+GjvEo7d2msLLD2P2sGe6HhOCyxZFUh67vKlMkfjq/43A5ZLnQE4Epo4QKh9vGG9cWrtnAncPNbZPWJrlpsgPrEZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PA4PR08MB5885.eurprd08.prod.outlook.com (2603:10a6:102:e6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.21; Tue, 10 Aug 2021 13:48:53 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::cd22:a583:c97c:72a6]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::cd22:a583:c97c:72a6%7]) with mapi id 15.20.4415.013; Tue, 10 Aug 2021 13:48:53 +0000 Date: Tue, 10 Aug 2021 14:48:50 +0100 To: Fangrui Song Subject: Re: [PATCH] elf: Unconditionally use __ehdr_start Message-ID: <20210810134849.GI20410@arm.com> References: <20210807055844.1855107-1-maskray@google.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210807055844.1855107-1-maskray@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LNXP265CA0041.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::29) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.49) by LNXP265CA0041.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16 via Frontend Transport; Tue, 10 Aug 2021 13:48:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba335e12-83df-4147-7186-08d95c059c4c X-MS-TrafficTypeDiagnostic: PA4PR08MB5885:|VI1PR0801MB2061: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: J+MjOm0il62JOGoz27C6Iwf3c6UAF3P1OoxG6N215MhIDL9spbAn+fUeXtU4JHxtH7HGQdmFTAF8zEQiO/LXPc4XljDBfnyHAdCA4Ypq27LBPCREcEGo0A8xXT/0k1nrayXwnFvb4DPUxDjcoAR69/5m2O1Hki/Ccu4S0BZ5s126VaB3XhA/4YFVxF/YMYP6018bAOIWg1VP6NTtqy8b8FuFn04TGYho/iqjcukZGzHHTbUMXpOKWDYjXwgddxaZRujspbZqa3+aKsm8x+bO7cR0qUuiaZ32SRQc4HyhpWwnEckqApig6Aw0fwkKPnuHMifyVnGsSlCuhIV88/vkivCle5I2ztVD3RTcAHwXfrLpmfijgqPlXMlJntxV25AinKcEUWILjvdAYiJwS+gYeX3LVnlr8wehM3z2EPoxePneX/bmDh8+D7S4kM7fvpX1V0Dgt8ZsPajP4CnkVAH3TWMKtrPFpEKI+nY9EuFFzc8crS3OspZd6RzhMeCi/BN/uJOTjjCZ5WWc+6OchG5U3fNIRhOqGlsvlKWWTu98+1757JSoIOhweec02+sYrElcbkCP1hKoctgCLnhC2zdEywpFL3DByciGRcQC9ZcUgOaxGT0i31JjIvC6UeLFUohPjcidlNoXD+tPA7aCYPUb3AYtfu5RBFIqf4c8saIq08U62rsJlCj01rI+WeKEf0WrLqf9OZivPx3jfPWh0AIbVlZ0sG20wEqlhR2xyK2NmityYtRNksB6mF7TJr4WlxUiW87Lctea+GjOGjQnQDPPVA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR08MB6320.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(376002)(39850400004)(366004)(346002)(8886007)(8936002)(4326008)(8676002)(478600001)(316002)(55016002)(66556008)(2906002)(66476007)(52116002)(7696005)(5660300002)(38100700002)(66946007)(38350700002)(956004)(2616005)(6916009)(26005)(186003)(1076003)(86362001)(83380400001)(33656002)(966005)(36756003)(44832011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TmUzcW9nclU2bEZLRE9QYlREWGt6WDNHWEpqSHpnOExUVkc1bFRjcnhZRXJM?= =?utf-8?B?ZmVWOGQxUkxQNS91OENGN2JISDBpNG82ZjlEbHprM0VPYWg3eGFLQUk5cldz?= =?utf-8?B?djVUaU9jaG1BQStIRkRJUVhKWUtvT3kzUWwzbUU3QnVqQVNvZ01XQUt1R3ps?= =?utf-8?B?LzhyalBhcUdCQndydFVvKzNMMUdydEc2eWxidzRxUWVJL3k0NDhGS1ZsK3Yy?= =?utf-8?B?MmE2anp6bWl0RXplT2RvZkh6R3RISFluVW00cWlaT0JtL3NvNE9NTGNjcGx0?= =?utf-8?B?UTQwMDgxMkdEL285MTFEdk5qU29rdkI5SEVrWWliOUFmYmhncFdTU2U5VS9S?= =?utf-8?B?WGtzS0NnUkdaSlg2RDZoOVVIbDdHR1dLNTFTdUpOZ24xbldYV1lzL3JVSzFS?= =?utf-8?B?bHF2NnJMTzNSSllwYkVuWTI3Q043ZVc4MlhmMHJKa29zV1NYWjI1S0VKUVRQ?= =?utf-8?B?dHgzNTJaa1RhYTh2K0VsYW1KQ0ExUnJQOHFIRCtwZDg2TDh6VnBzTjRycW9r?= =?utf-8?B?cWJibEw0b0Z0eFJUT2Uwb3FkQjlITmM3WVZGbWc4dWR4M1Y2K1c4eGRweUxp?= =?utf-8?B?K2lXakpGTlpzRHhtTlZ6bkZhcUgyMUlHaUtIZWJuOWtGYnNjZjE1OGJENVow?= =?utf-8?B?c1FSczBKTzhYWnZlZkdNTHlZOWN0U3pPQUJaN1ExeER4ejFMbnBQcEZpbDM1?= =?utf-8?B?RTRva3pQQ0JUeWp4OWwrQmtZZzlSNXJzcXJsbXZET2V1V04wd2xCTGlsbHlD?= =?utf-8?B?Z1JjNEhIeVhCdzlCZTdTZUo0K0RzR2FCeVNmeWZSODVXRDZ5RGk2d0xMd2xl?= =?utf-8?B?N3VpMnFvekZXZ1djRXNZRlVOOHdYRVZKY1c3dFVIdHh3U2UzWU5CYXhqZWd2?= =?utf-8?B?YWgwd3RwRHBOS2pxT0loTi9pSkdYbGRuUVFmUmhwQldVa3dlSXpyQVBCRFlR?= =?utf-8?B?N2dnRWJ3RWlIZ2phalplc2lLeVNWTU8xVDY5a09OZDNRVTB6ekZCSzZTZXRo?= =?utf-8?B?WVJzZ1Z3QU8zTGVNY1J6OW4vcW56REFiTXZtN2ZKaVRwZUJ6bXJiNVRNOUZm?= =?utf-8?B?VGZFdmM0bURvTVk2RGk0Z0dVRVV1SXdiOXByVzcxQ2pERllTMU5PdFdzcmM0?= =?utf-8?B?WGZ0eXo3QVdNOFpnYndkc1N0Qit3N21mVUkwdVp1Q0dqRDhvZ2RIdlZBSUJw?= =?utf-8?B?MGw4OG96Y0VWZEt4ZTI1WFpkRHRRRzBpanExbFk2MVh6Q2dBcUZnNDJ3Wll6?= =?utf-8?B?OUJFa051WWlmNjRxVnptQkU2elV3c2RIUFdPS0JGaXJYdkNVMmJjN3RzbXJo?= =?utf-8?B?aDRkblAwdE1SU3g0M2Y3c0pRNkVEZUpod3NEMUtrbDc2QVIwcDRsbG10dy8w?= =?utf-8?B?SlBiM1NZSTUrVDh2MjBjTlZ2d3BzbVg1VjZ3VUp0Q2lWdnJISzlBY2VxZExP?= =?utf-8?B?RlB2NUoxWUphcFVUVkE3VVlGbWlyZnd1dGw4K2ZQbkt0ZmllT1F2b3ZVQlFU?= =?utf-8?B?WUJDYS9uSEliOTBpb05xVTlxWlBBdjMyNTFLbjIvMTJUeW5SNWZYajhZMnZY?= =?utf-8?B?Ti9CUHdpek9zWXVmZVFPZWV6Wm9SSW9VaTRPRUJkV3ZZeVJqZnFaa3F3blM0?= =?utf-8?B?bEprYzRhdk9DV1JIU0x0RlYzT2Jya2hLbGp2WUZOc1N1UW80L3VzMWptRG8y?= =?utf-8?B?UmJvMDNzc3Q4cU5TakxUM3lxWEtDRklmejltcWlFR2g0N3gySlM5WDNGcGoy?= =?utf-8?Q?JlK3O/4jByBAmScILjK1ajTpEGfEU2IQr1p7Kvo?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5885 Original-Authentication-Results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 06e87630-d3e9-4da3-63c2-08d95c059716 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Osgt2cd0Ah0ZkgiUvNxzi1Awv7w6rhGD+1S1dn4KH16ax8ZHX2kx6e57uUCPIPtxiPpvPUrSvY6yL+aCrzt8TFNqUELu6LebnDmec4KiWRHUcALhlCLgYSV38Khye+hcYy/13P3zIBvuEsE6xR/RE9euVYd98YU9RGHLxbTEIajzhR0387kMFFr9Uwv8JgHCKaawFtYOUZNnSEau8PfdtKn5+NYxfnNHtPHycM3Mt0v6p9PIbt0uVomfB7RIDju60CurRd4gNsYp3Bd9ySm5qk4DW2VBlIvQhku0wLX/G2SJ4C0l68FvEl9dRYuT/F1brVUZxXd+6H7i7gVkYpJpOTljQGozfu+IRthtXFtHJj4fG6PuSkfbdw1vlpGmcnbLQZG8S1WfncRBj0KuNMku/Q81MdpYy1X5fPDsViylz6j6OWOA9b9hK86P0KFhZPBsJ5sXgQrXCP5H5C7T9a1DTf2G3e+2qJ5xJH7E5jrfUk7CibZ/dBahJ9I5PdtLef6DdPOkBPMz3IvxrwFhovxHAq7oPfsTUr5BacSh3F/PSAHt5G12f4MHE6VW3VREwKclnZzJCFrN1dYAZVLDMyEYGBnB7xs4wvNPjluJIC835dknX+ueTPveDOJfaCD1tFgHVcUxIOvIu9f4WFj60RnKKbWoN2+NNAYMf/YOIH9bbnasUkOYq/LS+aIDY79L8X0JEv1GIhfsipl8Ztq7Ear2SQqDnf/L6wXp/nV3FAFE4Ve4WR984qTOCidekVz9TUHnAnjPzcgFcnlCMiCDs3TvAA== 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:(4636009)(346002)(39860400002)(136003)(396003)(376002)(46966006)(36840700001)(86362001)(36860700001)(47076005)(36756003)(8676002)(966005)(33656002)(6862004)(2616005)(956004)(336012)(44832011)(55016002)(4326008)(70586007)(26005)(70206006)(478600001)(186003)(1076003)(7696005)(2906002)(82740400003)(8936002)(82310400003)(5660300002)(83380400001)(356005)(316002)(8886007)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2021 13:49:01.6413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba335e12-83df-4147-7186-08d95c059c4c 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: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2061 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: , From: Szabolcs Nagy via Libc-alpha Reply-To: Szabolcs Nagy Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" The 08/06/2021 22:58, Fangrui Song via Libc-alpha wrote: > We can consider __ehdr_start (from binutils 2.23 onwards) > unconditionally supported, since configure.ac requires binutils>=2.25. > > The configure.ac check is related to an ia64 bug fixed by binutils 2.24. > See https://sourceware.org/pipermail/libc-alpha/2014-August/053503.html > > Tested on x86_64-linux-gnu. Tested build-many-glibcs.py with > aarch64-linux-gnu and s390x-linux-gnu. this looks good. Reviewed-by: Szabolcs Nagy > --- > config.h.in | 3 --- > configure | 52 ---------------------------------------------------- > configure.ac | 34 ---------------------------------- > elf/rtld.c | 13 ++++--------- > 4 files changed, 4 insertions(+), 98 deletions(-) > > diff --git a/config.h.in b/config.h.in > index 8b45a3a61d..0d92504f65 100644 > --- a/config.h.in > +++ b/config.h.in > @@ -198,9 +198,6 @@ > /* Define if CC supports attribute retain. */ > #undef HAVE_GNU_RETAIN > > -/* Define if the linker defines __ehdr_start. */ > -#undef HAVE_EHDR_START > - > /* Define to 1 if the assembler needs intermediate aliases to define > multiple symbol versions for one symbol. */ > #define SYMVER_NEEDS_ALIAS 0 > diff --git a/configure b/configure > index 9619c10991..7272fbf6ea 100755 > --- a/configure > +++ b/configure > @@ -6636,58 +6636,6 @@ if test $libc_cv_predef_fortify_source = yes; then > fi > > > -# Some linkers on some architectures support __ehdr_start but with > -# bugs. Make sure usage of it does not create relocations in the > -# output (as the linker should resolve them all for us). > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker provides working __ehdr_start" >&5 > -$as_echo_n "checking whether the linker provides working __ehdr_start... " >&6; } > -if ${libc_cv_ehdr_start+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - > -old_CFLAGS="$CFLAGS" > -old_LDFLAGS="$LDFLAGS" > -old_LIBS="$LIBS" > -CFLAGS="$CFLAGS -fPIC" > -LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared $no_ssp" > -LIBS= > -cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > - > -typedef struct { > - char foo; > - long val; > -} Ehdr; > -extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden"))); > -long ehdr (void) { return __ehdr_start.val; } > - > -_ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then > - libc_cv_ehdr_start=broken > - else > - libc_cv_ehdr_start=yes > - fi > -else > - libc_cv_ehdr_start=no > -fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > -CFLAGS="$old_CFLAGS" > -LDFLAGS="$old_LDFLAGS" > -LIBS="$old_LIBS" > - > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ehdr_start" >&5 > -$as_echo "$libc_cv_ehdr_start" >&6; } > -if test "$libc_cv_ehdr_start" = yes; then > - $as_echo "#define HAVE_EHDR_START 1" >>confdefs.h > - > -elif test "$libc_cv_ehdr_start" = broken; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linker is broken -- you should upgrade" >&5 > -$as_echo "$as_me: WARNING: linker is broken -- you should upgrade" >&2;} > -fi > - > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the assembler requires one version per symbol" >&5 > $as_echo_n "checking whether the assembler requires one version per symbol... " >&6; } > if ${libc_cv_symver_needs_alias+:} false; then : > diff --git a/configure.ac b/configure.ac > index 34ecbba540..af47cd51e6 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1662,40 +1662,6 @@ if test $libc_cv_predef_fortify_source = yes; then > fi > AC_SUBST(CPPUNDEFS) > > -# Some linkers on some architectures support __ehdr_start but with > -# bugs. Make sure usage of it does not create relocations in the > -# output (as the linker should resolve them all for us). > -AC_CACHE_CHECK([whether the linker provides working __ehdr_start], > - libc_cv_ehdr_start, [ > -old_CFLAGS="$CFLAGS" > -old_LDFLAGS="$LDFLAGS" > -old_LIBS="$LIBS" > -CFLAGS="$CFLAGS -fPIC" > -LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared $no_ssp" > -LIBS= > -AC_LINK_IFELSE([AC_LANG_SOURCE([ > -typedef struct { > - char foo; > - long val; > -} Ehdr; > -extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden"))); > -long ehdr (void) { return __ehdr_start.val; } > -])], > - [if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then > - libc_cv_ehdr_start=broken > - else > - libc_cv_ehdr_start=yes > - fi], [libc_cv_ehdr_start=no]) > -CFLAGS="$old_CFLAGS" > -LDFLAGS="$old_LDFLAGS" > -LIBS="$old_LIBS" > -]) > -if test "$libc_cv_ehdr_start" = yes; then > - AC_DEFINE([HAVE_EHDR_START]) > -elif test "$libc_cv_ehdr_start" = broken; then > - AC_MSG_WARN([linker is broken -- you should upgrade]) > -fi > - > dnl Starting with binutils 2.35, GAS can attach multiple symbol versions > dnl to one symbol (PR 23840). > AC_CACHE_CHECK(whether the assembler requires one version per symbol, > diff --git a/elf/rtld.c b/elf/rtld.c > index d733359eaf..878e6480f4 100644 > --- a/elf/rtld.c > +++ b/elf/rtld.c > @@ -1684,21 +1684,16 @@ dl_main (const ElfW(Phdr) *phdr, > if (GLRO(dl_use_load_bias) == (ElfW(Addr)) -2) > GLRO(dl_use_load_bias) = main_map->l_addr == 0 ? -1 : 0; > > - /* Set up the program header information for the dynamic linker > - itself. It is needed in the dl_iterate_phdr callbacks. */ > - const ElfW(Ehdr) *rtld_ehdr; > - > /* Starting from binutils-2.23, the linker will define the magic symbol > __ehdr_start to point to our own ELF header if it is visible in a > segment that also includes the phdrs. If that's not available, we use > the old method that assumes the beginning of the file is part of the > lowest-addressed PT_LOAD segment. */ > -#ifdef HAVE_EHDR_START > extern const ElfW(Ehdr) __ehdr_start __attribute__ ((visibility ("hidden"))); > - rtld_ehdr = &__ehdr_start; > -#else > - rtld_ehdr = (void *) GL(dl_rtld_map).l_map_start; > -#endif > + > + /* Set up the program header information for the dynamic linker > + itself. It is needed in the dl_iterate_phdr callbacks. */ > + const ElfW(Ehdr) *rtld_ehdr = &__ehdr_start; > assert (rtld_ehdr->e_ehsize == sizeof *rtld_ehdr); > assert (rtld_ehdr->e_phentsize == sizeof (ElfW(Phdr))); > > -- > 2.32.0.605.g8dce9f2422-goog >