From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70088.outbound.protection.outlook.com [40.107.7.88]) by sourceware.org (Postfix) with ESMTPS id 4C4BD3858400 for ; Mon, 18 Oct 2021 11:08:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C4BD3858400 Received: from DB6PR0402CA0020.eurprd04.prod.outlook.com (2603:10a6:4:91::30) by AM6PR08MB4101.eurprd08.prod.outlook.com (2603:10a6:20b:a1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Mon, 18 Oct 2021 11:08:29 +0000 Received: from DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::66) by DB6PR0402CA0020.outlook.office365.com (2603:10a6:4:91::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Mon, 18 Oct 2021 11:08:29 +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 DB5EUR03FT064.mail.protection.outlook.com (10.152.21.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Mon, 18 Oct 2021 11:08:29 +0000 Received: ("Tessian outbound a8bfe25d7364:v103"); Mon, 18 Oct 2021 11:08:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3a4286bb5a9b0a81 X-CR-MTA-TID: 64aa7808 Received: from 5aafd40f9634.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0B7F7E20-F537-480A-B1CD-525318CE6399.1; Mon, 18 Oct 2021 11:08:21 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5aafd40f9634.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Oct 2021 11:08:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJTTPcoSbFcOJkigBwAryyWCyO+GcIKbiM82DpIKID2ezav367Z6v2AGyr7/ha27oSIb71RpFZM3s10QsB6/UHG+2av5D7ZKfkPKtz1c61nj5IroUSBTUc0OU25Zr3r1cLSP/mOzkWvbgkSwXefN7c0sMggUnkdI2PJ5tUksQPiWVVgtnG2nE1ktrexnUnZtSEyPh42BQ4Lxy6XAzxRzctCZTSiG+yLiw9C751CZVjnIvYlcxAoWgfboF10sV2fnVmKgZGWMln5kxm53iR9TUXXorQVeNE11B8Nh3bVGiWQQMzPkEOJj1plEZwmwe8nGF4/1r1QnfG9D+lz+PcKOmA== 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=WU7MSl4MjtK+Ag27NYTieffJp/80126p2haSRTvsAmE=; b=MYlCvAGFvN3bo1jC1AIudwpTPzqeFWLPqVYnkpP4fR+89NaO43SLtmwGlGUcDGVg2q/6P5t5bC1MQ/tVIXfgj/ezPPjaewQyINvmPWLWFZV7BNFYuIFY8q/NBpQ5wVhsABrvJe1Zd04KoSO3TMik951nv/89beiolN/A9vi7lKjO5wcChHroBYpmiemVlDXYTuFA8o3q3KkvSpitdlWbaxDzXl6LKSCZBOtfJUgGHrqnBO7AyVnyF1bomGVCWpqUzrh9c+vmcxXuE3l66gfVzfUNskCaKQvx+H8lOHMLgodNGk/7tTChPy9LfwiLbKjSFVk1VuZJovThtTr1eFCbyA== 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 DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) by DB9PR08MB7129.eurprd08.prod.outlook.com (2603:10a6:10:2c7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Mon, 18 Oct 2021 11:08:20 +0000 Received: from DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::2900:7140:8ac4:6846]) by DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::2900:7140:8ac4:6846%6]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021 11:08:20 +0000 Date: Mon, 18 Oct 2021 12:08:18 +0100 From: Szabolcs Nagy To: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: Lukasz Majewski , "H.J. Lu" , Florian Weimer , libc-alpha , Patches and discussions about the oe-core layer , Andreas Schwab , Joseph Myers Subject: Re: [PATCH v2] dl: Use "adr" assembler command to get proper load address on ARM Message-ID: <20211018110818.GE1982710@arm.com> References: <20210907131616.23472-1-lukma@denx.de> <20211015075417.29931-1-lukma@denx.de> <20211015120915.GD1982710@arm.com> <20211015145831.5d0fafcd@ktm> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: LO2P265CA0375.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::27) To DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) MIME-Version: 1.0 Received: from arm.com (217.140.106.52) by LO2P265CA0375.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Mon, 18 Oct 2021 11:08:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: faab71cd-19a4-4398-25cf-08d992279d67 X-MS-TrafficTypeDiagnostic: DB9PR08MB7129:|AM6PR08MB4101: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1332;OLM:1332; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ejvdAHgt+Obm8/h7TaVvCzL2uUkh0ioGsLKvjRk2b2+NtV3hhskgV94i7crOhBWl3RAtzTWRa3fqkbP7fc1x/UtxDji0JyPP8j8syxpWXdzgvGIMsJ10KZELWUrp9MEBKtrEA7ZfRDZwQSGIyNKOS7aXw8q51SFuolmq2Nurr6EFpx1hiwTNTm//gyhVLA1WmaoXtsU9f8dWC3oiVp3QKXpFuutYSatSzQnjt2WQQOTJVXkua1Qv+gz2pBol9SWSxo+SDOOXKOeP4hnj4qIwPoXa1oIMGrBBcHu2PIlNkzUBh4bQrmQdQjogePQLkuPLshhE3JqjzqxN8SBWjbTYa/CaNQH+cx83zni7LxObQlMG8aysDJJwMvjfVx9cJaLmTZiFkE+TYn5hQgNOINpegtPvqgyjWa8F3T0CLSCoQJY4A2sXqYE4dHuhTVhpLI09H1eqde+rpbeMx4Sbscw4AfynDxVb6DE6F9gooesNu4ib6pRbh/wTvMI2fWLqT5/kwiZWBMwZM+EL5SLfLGUvK7d28tiarX/Zyq0wm+HIB4IskMrrr/FVj3vrstjhMykA5SmIlvY6h1v80HlwssW268IH6fCtNvJCN/MTq38KGxV6zoVSV6J3h4PHRApxDdbcW7JhVKUshNCon1O9o0GwUXh4b9lquJwWQYSZ4bSwBCbcNMYJ70pccyTyEUTpsldNRWtuLNLjWavGht+Dp+wttQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB7179.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(26005)(66574015)(66556008)(66476007)(186003)(36756003)(1076003)(66946007)(38100700002)(53546011)(38350700002)(956004)(2616005)(86362001)(6916009)(7696005)(8676002)(4326008)(52116002)(54906003)(33656002)(5660300002)(8936002)(2906002)(55016002)(316002)(8886007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7129 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: DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 137fbb55-61fa-43f6-f7b3-08d9922797f8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dO6QwXjdGTmbF/HEH460MMM2qIYdi9OvtzUtjKFRlAdtl4HKTxMHwwecQSYzy7LHeb6KDn/x8StNieq4qaITZCmU7+BA0NM0+GFajmNcQK53y+Q9A9Dn9PyQQisCmtAUBxdfsuhF7DPjdSicQDO7r98j+OiFfUPwGXbmIFHxn3q/OP4ceZR4D4NdYlK8zX5gCdi+V1YbDm1IFpiY58W47L9v2Im32zAQZjVTlrWY5/9bMcQ+KXIyMHGunvgkx88ygegWTNJ0Aknb+vzCFL2oLQNJgqvtJKBnukBWtOv095Ah+FW8IGj3Adm4a0Ws6Fxttpb2F2w8oXP8Ox6tK4OU8PinwYS2uDSLgpEm6qBnSock6urVNFHT14YTngunzg6TgAMxCF15Sq5QwaI3f+lgsJ/XHH/ECQYTW3+QJ8RyT0A99bWNzWJFBUN+vWBN0bLePKcAKuy6LFBOKEch5Krx+wUp/1FvRb2bBzbikgjQUCQMQS4YAJUkxP3laydNTqvgQ+6H7rszmLgS3qswaUjsLwiVXIXKfTTqt6eCl082sEP7HHgAPRqzElorJZFQUQRZjCYwT0qSW3eNR7sHXM7mcOvHNYP0gJgU8kqObXGJtviS3oY2F/gGmS8d3cRicWlkcAVobBQpoP1Qo9KU8+DBJzqzoCMFFUTkhTWKtsQZpcQMrqJkbVNLc0vAKc9mFNIqBMILHNxjH2lgS7hFUyBAtQ== 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)(316002)(8676002)(107886003)(82310400003)(7696005)(70586007)(2906002)(36756003)(8886007)(33656002)(36860700001)(66574015)(956004)(336012)(53546011)(5660300002)(186003)(26005)(81166007)(356005)(6862004)(86362001)(508600001)(70206006)(4326008)(54906003)(8936002)(1076003)(55016002)(2616005)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2021 11:08:29.1728 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: faab71cd-19a4-4398-25cf-08d992279d67 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: DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4101 X-Spam-Status: No, score=-7.2 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: Mon, 18 Oct 2021 11:08:38 -0000 The 10/15/2021 16:53, Fāng-ruì Sòng wrote: > On Fri, Oct 15, 2021 at 6:00 AM Lukasz Majewski wrote: > > On Fri, 15 Oct 2021 05:21:23 -0700 > > "H.J. Lu" wrote: > > > I think either prelink should be fixed not to prelink ld.so or Yocto > > > should be fixed not to prelink ld.so. > > > > Could you explain why? > > > > Was the relocation of ld.so (I guess that ld.so = ld-linux-arm.so) a > > bug from the very beginning and it was apparent just now? > > Prelinking improves application relocation performance but prelinking > ld.so itself doesn't provide any saving. > It is very likely that the prelink program doesn't intend to prelink > ld.so. It just doesn't provide a diagnostic. > If we look at the problem from this angle, prelinking ld.so is a pilot > error: OE/Yocto used an unsupported thing which happened to work in > the past. > Now, the unsupported (well, it can be supported if prelink correctly > prelinks ld.so) thing fails. > I sent the original commit trying to untangle the messy arm code. > Although Szabolcs's version is still short, I'd prefer we don't work > around glibc for error/prelink errors. i don't know much about pelinking, but i'd expect that ld.so has to be prelinked for it to work: if the kernel can load ld.so anywhere it will conflict with other libraries that prelinking allocated to a fixed location. instead ld.so has to be prelinked to an offset that comes after all other prelinked libraries in the system, then the kernel will place it after all other libraries at runtime. i don't have a prelinked system to check if this is the case.