From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by sourceware.org (Postfix) with ESMTPS id 01E9D3858431 for ; Fri, 8 Oct 2021 09:15:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 01E9D3858431 Received: from DB6PR0201CA0013.eurprd02.prod.outlook.com (2603:10a6:4:3f::23) by AM7PR08MB5462.eurprd08.prod.outlook.com (2603:10a6:20b:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Fri, 8 Oct 2021 09:15:21 +0000 Received: from DB5EUR03FT026.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::d5) by DB6PR0201CA0013.outlook.office365.com (2603:10a6:4:3f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 09:15:21 +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 DB5EUR03FT026.mail.protection.outlook.com (10.152.20.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 09:15:21 +0000 Received: ("Tessian outbound f1898412aff1:v103"); Fri, 08 Oct 2021 09:15:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e48caef14ab055d9 X-CR-MTA-TID: 64aa7808 Received: from 2a7f887edea6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BA62CB06-C89F-4317-949B-FF042D560A16.1; Fri, 08 Oct 2021 09:15:14 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2a7f887edea6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 08 Oct 2021 09:15:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJyZ1AV3WBbL63uZTAYDWFYqT7KTu0EXAFJCQSn61LRs7X+l7bGBWVfi+1RjLYa74ZixdYPff9CPRa3fceN8w2Cjjhox28di1MiobAvmMyw542debPhCsQPwN5CChJ1EVLjh3rogkbc8YNzlsJEW97Z4/P9puqPOq+nKH0dHfVCUKYz3p8D07Ch9XuMQs9mkvq0AVrA/C3j9KmNi04dbUFUdOKTfjy/h7qtX5Pb34oP5Y6XF5kQ0uZqJgbyDfQ1clvIcfDFI2DYJU+JNHT7eBIEBIqi0n599XIZjqdYE2V70eFP2c92TSQJUYrjHFltzS/v40Lx2vFCGSmrWmE8tHg== 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=AR1qP2evBZqyd8eniZ9XBVxjSkp9I8v11NB96fEZDMU=; b=fxtRjv/jbZWaQHnmhBHDWqPfSYl8x0TCTiin35XswF+9DLykCC+bIAOSP1oSssYPKz5y78LxDbJpiziSmunQsi35EKDFSZUa+ZM9FTkplFMC7BEwjvWyYgA1T7yB+EdU3Ya1YEWtKH7wSo9fab7kXJtMh2RgPeOl6VMg5i6IELWRYJfQffyJwU3en2y2DFMdUwSxHBP0gD3IUKsYa6bSFh7DZKIIF/PuXSZyDWjuqspJz2qG2v/7gKxhnlCT9YKcNqZ1kmcye2U49cW9PixfkxK2LNtf9gdHDVsTxBK/sGf+ORKEOvl/7rN9fb7wd7RuVO0dj6QkMk7g+uhRYJ4YZg== 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 VI1PR0801MB1854.eurprd08.prod.outlook.com (2603:10a6:800:5c::15) by VI1PR08MB5423.eurprd08.prod.outlook.com (2603:10a6:803:133::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 09:15:13 +0000 Received: from VI1PR0801MB1854.eurprd08.prod.outlook.com ([fe80::a592:9d43:f9d3:bad7]) by VI1PR0801MB1854.eurprd08.prod.outlook.com ([fe80::a592:9d43:f9d3:bad7%5]) with mapi id 15.20.4566.023; Fri, 8 Oct 2021 09:15:12 +0000 Date: Fri, 8 Oct 2021 10:15:09 +0100 From: Szabolcs Nagy To: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: Adhemerval Zanella , "H.J. Lu" , Florian Weimer , Andreas Schwab , libc-alpha , Joseph Myers Subject: Re: [PATCH] dl: Use "adr" assembler command to get proper load address Message-ID: <20211008091509.GH2700@arm.com> References: <20211006134344.63395242@ktm> <20211006125517.GE2700@arm.com> <20211007111926.30db4c4f@ktm> <20211007120038.1445bbd3@ktm> <44bac775-3127-7bc7-c4ea-fa282ed277d3@linaro.org> <20211007155730.GG2700@arm.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: LO4P123CA0108.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::23) To VI1PR0801MB1854.eurprd08.prod.outlook.com (2603:10a6:800:5c::15) MIME-Version: 1.0 Received: from arm.com (217.140.106.52) by LO4P123CA0108.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 09:15:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1f945ef-2085-49eb-d95c-08d98a3c27ae X-MS-TrafficTypeDiagnostic: VI1PR08MB5423:|AM7PR08MB5462: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: kJo8hhaaZGYOCIwmrpO9hRbbL3D3VTWb1xPEdhKYfthimdV7X+G/T03UxhAUNZ4eoht4ZqglCqXzOIwRWNZV3Zu3me03AJRf5RFZmGO5trqswIeux8kQcYzGX/L7Y4mEBIs0dCRQyKyhK+/mNgLFjJsC+eBxrfXQ6qeqWb6k3Ln4RhVe0FXHR4ikTPR2gJxq9RfTFnTH4LHP04Bo8rdQEO8wTq0P4aNrAe/BRr3NQElQ5lGCp8R0+nwLYuaVvCTDKwSFo3lcoqT2sFnnZng4/GTxw6ZPCZonvFMWYh+dYaCN4V/07DhwBmWr5OovtjWi7r5Yh7fysiN37bdPdiXqX151HGcfMA/GkokY+nsbvuezyGVwzTob4hVbIODHI6OKvw2stFAg8v4BkC46OXgsYgmD29kAk99WR4DJfU/0WGsfaaN0FyZsMVVwnb6WI8eXL0ygzNfXTHnHusp6pSsMlmwVv6utIRw10btRJJHwxuAvWykcHdYi4Q5tEzJcQhxbaceY0JUqf3IlLhplSlnWT728oWOl6/INgIfgAy4pW9JwH7/P1yryF7nT23yacQXrR1UnxrteIqgblgohcAsJvCdY+hekL89kRYUNhAD8/ws7Kt/rh6st/9ASNS8QEz56yC0Vy8QN3+QWIrHKI1UoMrJQ5BnVxLdeZu17pvs1ZJ3zaQRmmBWUqsRbNJC6+z/H9k7rKCMqPvzepZLxo+gHe6xVm3xBoWGYMS72QxHW251SwFysJNNTA9ZdlVk4ZuV6pcnXrTziRsl8HL1x3fiPgg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0801MB1854.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016002)(5660300002)(33656002)(4744005)(1076003)(508600001)(66574015)(316002)(6916009)(66556008)(66476007)(966005)(54906003)(36756003)(66946007)(8936002)(86362001)(186003)(8886007)(2616005)(956004)(4326008)(26005)(52116002)(38350700002)(2906002)(7696005)(8676002)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5423 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: DB5EUR03FT026.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 8df1a720-656a-4f73-3e62-08d98a3c2204 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ddAQQzJTOBdD6N0oGD1m/hbfjWQSolocHoK7f6E7uVj8ag3uYE8RrGQCkzGogX5liPdcQVgTZ88Rk0pimjuLktckAUax8GUAo0qbo06qQwp80/msu2hyaV/FXNKhok+9fn63q0hCw3OFpS3LhdipW08ni4cFzfomXCO6SUhLdjj9WlczGE6pER9J1fHJYGWS1xQHl1JflpLDJUkjH3J05ReCX8K7doyGOGEv57NVrWNMaiF3+Lxo1sksxurHybTNeHiCI24FLC0aOGSQybuo2XBOgzrNa6aIGsVhTLRMi1/OYl19bDHTGxb7qMCI0gqE/6xQRdm0MOHrTu7p/8PAxgvH43ZDwDzmGrQqvqJ3yEgyp6AYvKRbf6Mm86f7EuMVYrzQwRn+23nycOStX0nHhV+gue7Ipc0OzrCfXOxQwELZu5rJ2bnmwT/JFfahHZTrUq8gO14vjNc0S03ZA9KDQZ1SpowhBToysTROb2G0sWFGKCKaFjlisX7DrVvLMHnrqTGOgB1t5H62dfshY+FMUVH5qOO0XSMRp348k7ie7VIIdob0lLEgzkeEprPmznpOQG3/9NcYhIegilX5qA0iEHEhkOtQDSddOm63cgNQbeg7DcOeWT0cQnODuAbnHXECbAQjRT8m7/fYkuLgtgEMxSw8f/VpHl6QFVXKngRsbE+DjFKIbwbHGzHap5ZeDOPmTR4LN1hL1LYyiSvWc6GlnqhR3mFIwcr3tOvRdKga+YkHRUhWhMXWtYTIxoPUdHG2lPxljF35Js00ju+drEbqtQ== 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)(36840700001)(46966006)(5660300002)(4326008)(8886007)(107886003)(54906003)(4744005)(36860700001)(55016002)(316002)(36756003)(6862004)(82310400003)(336012)(86362001)(66574015)(2616005)(956004)(2906002)(508600001)(1076003)(33656002)(7696005)(47076005)(70586007)(70206006)(26005)(966005)(356005)(81166007)(186003)(8676002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 09:15:21.8007 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1f945ef-2085-49eb-d95c-08d98a3c27ae 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: DB5EUR03FT026.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5462 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, 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-List-Received-Date: Fri, 08 Oct 2021 09:15:31 -0000 The 10/07/2021 10:24, Fāng-ruì Sòng wrote: > &__ehdr_start was used long before "elf: Unconditionally use __ehdr_start" > https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=elf/rtld.c;h=878e6480f4980b2fef468d8e271cd68acd4fc2d0;hp=d733359eaf808b8a5579908a6cd1153062c02919;hb=302247c89121e8d4c7629e589edbb4974fff6edb;hpb=13710e7e6af6c8965cc9a63a0660cb4ce1966557 > > It is surprising if that code could do something useful with prelinking. __ehdr_start was used as the start of the elf header. that's true even after prelinking does its offsets. the new use of __ehdr_start is to mean the base address by which local symbol vaddr needs to be offset to get the runtime address. this use relies on __ehdr_start to have 0 vaddr wihch is broken by prelinking that moves everything to some offset. in principle the elf object after prelinking is valid, but since this is the ld.so we can say that we only support the case when the elf header is at 0 vaddr.