From patchwork Tue Apr 12 12:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1616256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Dj7f9KER; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kd5Lb6Ky9z9sBy for ; Tue, 12 Apr 2022 22:55:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C429E385780C for ; Tue, 12 Apr 2022 12:55:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C429E385780C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649768148; bh=+aMfmgN9Q0adHqL5n0Xluxq+VrUs3kK+Aasaqe9x9fE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Dj7f9KERuo2SI+27514hByCas4Oq/+nSh2tAGictVXFeUWAHysGswLpY+zOyPAHMb sO34wIrUdd+RXFt23dkyCpTVN3amV2mlPPIdi3W790m/DgiB3iC2ccXjiS9bMgdGFR 5CA2O/b8+PUfHhHoBetIvbLAABfTYn8RdFubYVCw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2043.outbound.protection.outlook.com [40.107.21.43]) by sourceware.org (Postfix) with ESMTPS id 086D63858D28 for ; Tue, 12 Apr 2022 12:55:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 086D63858D28 Received: from AM6PR0502CA0040.eurprd05.prod.outlook.com (2603:10a6:20b:56::17) by AM0PR08MB3411.eurprd08.prod.outlook.com (2603:10a6:208:dd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 12:55:25 +0000 Received: from VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::13) by AM6PR0502CA0040.outlook.office365.com (2603:10a6:20b:56::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.30 via Frontend Transport; Tue, 12 Apr 2022 12:55:24 +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 VE1EUR03FT050.mail.protection.outlook.com (10.152.19.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.21 via Frontend Transport; Tue, 12 Apr 2022 12:55:24 +0000 Received: ("Tessian outbound facaf1373bbd:v118"); Tue, 12 Apr 2022 12:55:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5a3910159d7e9208 X-CR-MTA-TID: 64aa7808 Received: from 0036afd81b91.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9D610520-4638-4CE1-8CBF-9113D138C499.1; Tue, 12 Apr 2022 12:55:17 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0036afd81b91.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 12 Apr 2022 12:55:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OQcPxtXZiFhAGVMzhCV7oMxARy649fpNaevVYryC2yzK60TUyh22tlWFt8A+r68U20b9HYOV3m6fKqF1/fY8uhY20HU1g3Aik7xd68Hw+LAycvv+YsTiCC53v09E5mU39VtIt8akrbQ+1uSUc2kyds8JaOUkoQa6CNWapvjGbaRGGcY8lerX5oEuHOGsbqTTITgQShImgulVMdBOxkSSg7bjaKy0NmFHscQjnr/ew3f4CRckSt673t8vt58a7r4vrhRWFS5m6bFZ9mJCkwU95Wy9A3Eu1sK3RiDNkm2DHY+I9zypmE5JKe+OLv7MANyRCPLZlkY5ep1A1Iri4RG5VA== 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=+aMfmgN9Q0adHqL5n0Xluxq+VrUs3kK+Aasaqe9x9fE=; b=G7qIK9OShiZzS9Y41o2t2Cq0buVNAsiM5yd/aQtjgCieyKACI9+dumusotT5i/efc91mu/kQprx5lvXC1fz4BeBgkQzaoQqJ+KAb0nTVxjCXRV7abV727lDHkmtc/pGjlur3JdAMrGh8Y+iGa9eTsNLJWoDGVBbt9BEdHlBXXpcOr7W+NIk5bnzfV8CPY1nUTK8uFzNo0l8lZB+VgWL3G9zbbkoaTOQogEEtXWEyyKRPLyF+WTAv6eMiUojv7iu30lCo+5fLg2xBPXEGcr51D0bhM1AU7lETSKSXO5VBvqUn9FjoBwPBBIFw4p597jtooG4T/fLgk+S/ZCBhUyHyWg== 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 AM5PR0202CA0013.eurprd02.prod.outlook.com (2603:10a6:203:69::23) by DB6PR0801MB1973.eurprd08.prod.outlook.com (2603:10a6:4:73::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 12:55:09 +0000 Received: from AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:69:cafe::48) by AM5PR0202CA0013.outlook.office365.com (2603:10a6:203:69::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.30 via Frontend Transport; Tue, 12 Apr 2022 12:55:09 +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 AM5EUR03FT035.mail.protection.outlook.com (10.152.16.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5144.21 via Frontend Transport; Tue, 12 Apr 2022 12:55:09 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 12 Apr 2022 12:55:16 +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; Tue, 12 Apr 2022 12:55:16 +0000 To: Subject: [PATCH 0/3] Args adjustment with ./ld.so exe [BZ #23293] Date: Tue, 12 Apr 2022 13:55:08 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 7580f936-9753-44fb-77eb-08da1c83b5e5 X-MS-TrafficTypeDiagnostic: DB6PR0801MB1973:EE_|VE1EUR03FT050:EE_|AM0PR08MB3411: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: d3lZpIbvR6KkoWxQfEAEBqC0Z4DKyIEbakCuCbw14L/KL3aYofD1ybZM71dn4aYwsk/FN832bnIRouQ48gR46voZ2LKsK37aHwB5fAl6BGQRvQCE3zEb+WNyuhpnyN5/UEYY0w6TKWinOfBeWScGOdCRZocOiPhv3/QZX/q8nHWkZK3hgS/uQne3rIETRNvFuXjWYR67VhY4MbZ3TiLYx/LEc6WSC5P7jj+1XhemuWFoXtvDlryyTG77taRJfxVgtV1JuQU9iLDinp9lMZsVsju55gCDgiFaUBWxaa6rPmbACaHvRMct6vzOgD7Pm+uZHpoPHNaV8RZFPT2ZafSU4+WPebKfMaVjrTySFb/9iJgk0Xwc0LzRNbSEbUQ7dmrAlO7n6bcMCU7+CflX+MtNVq6dV9KQk4NJ930yR0fUL+OoH08lezWYUSJTjzzjMUMgblbdOgWiIIF66hVH8uN9PrMSWWaeQ7r9RS9OEQjpc+sxZFJhy13L5o138rT2VMiWQMgoOnZYKH8NcLT+qzG4L8/MQ/XnaKCpa+ZYzdIwlpwA4OatOqOdpooxqkA1rVJ7+Pvfzq0kCohnFKBwsJDisLR4CCejH1EqLF1THdly17Kp46QkWkFbGdCUZ+M1EZOQwapAB5nK4rsqRA0ShgHAhLrT4e2cDg6rSt8038AEUEBqQC9xhXXrjp8KIGC8TKpKzUeqlpO47WuaJQIaikSSqw== 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)(26005)(47076005)(2906002)(83380400001)(6666004)(2616005)(7696005)(186003)(426003)(336012)(6916009)(86362001)(316002)(8676002)(70206006)(70586007)(40460700003)(4744005)(82310400005)(36756003)(36860700001)(44832011)(508600001)(8936002)(81166007)(356005)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1973 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a24db9f-0d2d-41ea-733f-08da1c83acf0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kgZ0EnmkeMXmcN2UmeVTzwY2MhYeCOOQbxLrNMXkB8eKVPOmFs6GI0pxaAs5ezd1e+GgjXVRJ/LGwHvqVQ5WLqpQlrEBIUgtRZTv9ypbx7WNntM6KjIntfA4ergFKrA/p1+U5CBPtMf6Aj/hZtJ32Vmqto+9zBLcs6g6r7nU+eQ4YYnFU7ramROD6QUzlnQX2uMGwQ9WXhMuO8N205h1HuE6dMkB4eyDZdyil6Zr7ebUivVOQxxUL76HpWHOrYTHMnfZw++G2KgAeUxbznfLDkfW8rcGqOotavIgwjsgMJr1mFyVUqKHC0+hgXqbEMKH9IfRxJKo3kHH4Na4iy/qUhH8ls+xs9JrfNaGz8Qy5Yd95fLf45hdz+C17pPIKlhtwv09ECoCIxRNNYqNwcqEgh5MzvGtr1+XLupc8B3ZOIhJJv+XTzF2iiZUDr6/zsOJx01tMwQsh5uNJPwqpp9OaOyT99WdNn/NStsgI6u5at8ohGGKkrt8eZVsIERXTGLJBcR8ygB8EJFPy2tDof/5XEsDZNGRbUhRLTg1NrjC7xgPkD4fN6xWXeO0SZsB29p2f4yJc5sXiQThA3YR8JyIbINA8beyRFZzuKv2QmGfB3LgGd96PGtWjHGPockZ1urrH+enOkJSjoXlxeJ8jTdlWn4NwuRFmGJmu4us/PTqMpZr1NPHVYvhlFdDVILnr8qZ 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)(40470700004)(36840700001)(46966006)(336012)(26005)(316002)(426003)(2616005)(70206006)(70586007)(82310400005)(36860700001)(508600001)(36756003)(6916009)(47076005)(40460700003)(186003)(86362001)(8676002)(8936002)(83380400001)(6666004)(7696005)(81166007)(2906002)(5660300002)(44832011)(4744005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 12:55:24.3260 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7580f936-9753-44fb-77eb-08da1c83b5e5 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: VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3411 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, 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 Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Trying to make the ld.so start code more generic and less error prone. The introduced DL_NEED_START_ARGS_ADJUST may not be the nicest solution, but it avoids affecting code on other targets for now. Szabolcs Nagy (3): Remove _dl_skip_args_internal declaration aarch64: Use generic argv adjustment in ld.so [BZ #23293] aarch64: Move ld.so _start to separate file elf/rtld.c | 56 +++++++++++++++++++++ sysdeps/aarch64/Makefile | 1 + sysdeps/aarch64/dl-machine.h | 77 +---------------------------- sysdeps/aarch64/dl-start.S | 53 ++++++++++++++++++++ sysdeps/aarch64/dl-sysdep.h | 2 +- sysdeps/generic/ldsodefs.h | 6 +-- sysdeps/unix/sysv/linux/dl-sysdep.c | 10 ++++ 7 files changed, 125 insertions(+), 80 deletions(-) create mode 100644 sysdeps/aarch64/dl-start.S