From patchwork Wed Jan 6 13:31:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 41650 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 A43F63947434; Wed, 6 Jan 2021 13:31:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A43F63947434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609939904; bh=USFgIpPU99CStCdGEeJdJMTp6+JVAYeZcKv7u/NGSnE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=b4Ut8pYm2lQz6XyiYDHy1mlZhA84rcCqz9Il76g7AjxepbGjJzU7FbMQsmxZfHo7y 9Y/+VPUdLGnwHp3KPVi/gko50b7aUlksEvpcQkn461q8CY3tbsZeYkOCpgmMqPMe7Z +9M23QJeTLHoVaYEjnG7VeEgG5ocxUXmuY4NTJ6o= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2055.outbound.protection.outlook.com [40.107.21.55]) by sourceware.org (Postfix) with ESMTPS id 6DD663947434 for ; Wed, 6 Jan 2021 13:31:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6DD663947434 Received: from MR2P264CA0125.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::17) by AM0PR08MB3267.eurprd08.prod.outlook.com (2603:10a6:208:5e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Wed, 6 Jan 2021 13:31:35 +0000 Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:30:cafe::33) by MR2P264CA0125.outlook.office365.com (2603:10a6:500:30::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23 via Frontend Transport; Wed, 6 Jan 2021 13:31:35 +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 VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 13:31:34 +0000 Received: ("Tessian outbound 76bd5a04122f:v71"); Wed, 06 Jan 2021 13:31:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f6e24a231f183803 X-CR-MTA-TID: 64aa7808 Received: from 194813899c92.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F37A41A4-9F3E-4675-B242-D3D9FD26DCE1.1; Wed, 06 Jan 2021 13:31:28 +0000 Received: from FRA01-MR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 194813899c92.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Jan 2021 13:31:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iy1ekdK/hgtWCrsaM79j6dAZE1ZwFjZ19FuD3DsVyDhcJpxgG/Wv2Yfdznp+7olRUvCVRlSeQVApuTjKmj4OZoWWTUXi8rQvhVZtzb1HqzFY+dCmGb2bSRPfyCGykWpUKQy5zbxrJLnRFeKVcOaZeOX4ZXO3E2wQNMrKAx86wr9GrCaeFmBSAwXxc1cIahT3e59zT0G80/7Mf2Za1JJ2IJuBXj4J8pi+9rkrcounSQ0gPNHtqmInrB5rIwGhnwtaLMxUWrKlgSAU6XjRfl178ABWICFhWMl6aEOEpW2M0axYVCaeh1VkvzZGGET++Jo8EfHpRz2nChzdpi2HzLFSYA== 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=USFgIpPU99CStCdGEeJdJMTp6+JVAYeZcKv7u/NGSnE=; b=eDLHdgaga3MUkEvsPIuAdWcpR2lV2s52YGXQ5FoINw7eG5/4e1GHh+lLDYdIYP6curVGj2RUPmUrCu5b7T1G9X79ncTY+YSmO5izIFJyCKP/nQJ/6ccNaXCSZflaj++0vkcnuShwujgfxpwLMAOcFQbH8nUbZclkFf7BPjEP48rAoM4Ea5ePzdiV36zpwtqD5R7FRcXpL5OXSZ8NWmU8B3ypa7XhGbwkn1kzrptY2rCY2lg/BdVIyCSkFLqY5r3PGZBiaQRT6XyJXEbUDKziqu3cjLGGibd0aTJ+3F/fplIBMMujCk3Mvm641nhJiZj+4SbLdo2TD7aDXINgPBAw3g== 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: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PR2PR08MB4860.eurprd08.prod.outlook.com (2603:10a6:101:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Wed, 6 Jan 2021 13:31:27 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::700f:ddbe:a347:ee4f]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::700f:ddbe:a347:ee4f%6]) with mapi id 15.20.3721.024; Wed, 6 Jan 2021 13:31:27 +0000 To: libc-alpha@sourceware.org Subject: [PATCH] aarch64: define PI_STATIC_AND_HIDDEN Date: Wed, 6 Jan 2021 13:31:21 +0000 Message-Id: <20210106133121.19286-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0480.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::36) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.54) by LO2P265CA0480.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 13:31:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 15dea86f-f39f-4653-02e5-08d8b2476338 X-MS-TrafficTypeDiagnostic: PR2PR08MB4860:|AM0PR08MB3267: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2887;OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FrQfAS6ArKG4i76l7RYRRbQP86LC2jRXKd6N06s7+pCQWL73LXHym8uS+LSDhfhQtIxih8Bii8s1jmHDm5VFEqJY50Uzp6Ns2nqOnulZZDLmFcz5L+a5xUQmldmnDwb2ilY5AjPOnI8YCwaAoEPnOht3NG5MoDpGTKhKUio7cSQuHx9k61JxDvq2qrhFRSETp8gSVDqzBduQv87cAzFbTmUIYuCHBZ5jUx+NZaahLxLWum2lsYezA++rwMZlT15Ov7d1pthX63zPEm2E9+QXz44n5p22MMsCRFqxewiOF5mjjuHCXiJXCrEtR3GCsRGA/+j7xyafxf51tR2Yc3aAf7rAbakoOUrxorXlN6FW4elmColloAz7FasTujI/h7sdwxCAy+Of0CfVUvhcSKf3nLtBu0XSE+MinaYPPwkLGWz+cgXwrq7S//XMDl+3Cc+Gp3zoylSNv9koogYR3q9SRA== 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)(136003)(39860400002)(366004)(346002)(376002)(396003)(26005)(6486002)(83380400001)(52116002)(16526019)(8936002)(86362001)(44832011)(186003)(66476007)(956004)(8676002)(5660300002)(66556008)(66946007)(2616005)(6666004)(69590400011)(478600001)(6512007)(316002)(6506007)(1076003)(6916009)(36756003)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GErkLPwRrLIeYO9RWTTo96XrDkZEs/l1dVXfK7TFiNlppBK9FT7Za0e4xgcbGk3ftCwIY9Nu7uKK7bp7neFn/D5IDcTHHrakuYWxvicB2VjhWQTCqEr2b+14BEpIyax3mnNP/t7MjxDEaC6SE4Gr7S+v2zgBWpUJ9UjasYwyEKPZU8ukUIOk9f4nmIoWlFDzzpDgN1uHLZfd1Cf7SZnrmWTYOpYgOwdC4UReXmRLPgoaTXCsPCgUSNjpoHLUrzqYPii28KYw1cr340yJCioNIvqUoZ6IboS2F0XaF07kgkD2D4NVvIb3VdVhw6IEdcR92eDmhImKRJdojapoTBVHLGd2oFtXIfZf7dHYC+LEWxUkdC62tsx8Sd3Or6MBbBYhp14zF+V/Vo6T4H0qiyl2ijj3oKSz9mXDselaMThK0e8EhSm50jFLhMdeat0diJc9MfxsuRJoSceMYbnvpLIchnEQXXRMMIMdSuWDEutV2fDn4vE9Dmzuhq2ycr0kHybjsI6nwWitpA0MY2pGq5Xc4DBzQ1S3utUIa8dw9oXlwWRvh8+XMB0Qz+DWn4Ug4AeWyZhiTLUgGVnDVsZQaYhmdKwbLxKJLS0zZwkSU1uCgdt5hPdYiWijOYk0jKKv3RYHiE6rcrZuY0vVrxursmbMaojHo0B0aghc7yNGWu4c5pzBDgcN0xjcO/ryOZQJKOaZQq+iQgf8hqfFYKM5WYgOeIXEvztiHdUi73IWyCoZweFeNCHss6ZH15WJluw5iRc1eLb9fZ/w+GhCpBIpaYdrB9UVU8HWhg9wilkoYEqYVEf2plbEvfjdL+ZYO5MxDasC7mpz5LyV16JIirBO3gET8yWT8ye/2AYERidEOZBkHTVG3nZyaT/bQ4qeZCb6nnB6XWu6GyXFEph8J3pnCTdxae+FdYrfpWHNc+/+sjNRYipeOyIU0b4qh6nLlX77BrWQr4W5pIq4FRHgK1DklCv7FeCWC3hlYcogzw4/DVk5abK6mgQ1Xi+IhaOK4NO+tkZr X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4860 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 26c38b37-71d5-4445-9d26-08d8b2475e9a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gwyoo5dMpjvhPcyqXyfNGm5UNVzwPAgUZS0WHzVZyOhvhHcGdnf0kagGXHZt88+TPGaoL9TYQXkpwySzygqd34/R7DtSCUFuiWB6Y5w/HcJ1KU/fZ+cZFXn490bZtuMmPyUTYKbEDPxpOpWhdl7IZQanXxM8nCOXUxHOvYY1edt6F8y4f4uz9OlwO2FoDz/G/hfDWJHW99DdadjaNKCfkGVnnbb6EFKc9hd1R5g/z9nAi2/62zZsn2zhyd5+ifM6V1oqDtXj8JvJNIvGzOzq2ShnoPIseCK1BW4H7r1lAQXv1K+y26nqe+CkM5i2iAk6ZECUGJHkkSEsyPqyWcn9f6fD1qtwjv355fMSRyZENXeE1dMgXuB0VCIyfHZ7shAy/RfUHJ1BXALRMtU2UHcYFBZEM+45grE7XVU4B1ssUaN83yBP3I7DF71kRMithl/OwB7AUxeyLsm3fM3wRtjFLEx9iWgQljVlxjQo6bkY4rROIpI5ofXUaLxbBqfc72G0yfR7gLOICtDr7m7jtgIr5w== 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)(136003)(396003)(39860400002)(376002)(346002)(46966006)(83380400001)(6486002)(6916009)(86362001)(44832011)(478600001)(82740400003)(34070700002)(82310400003)(70206006)(8676002)(70586007)(69590400011)(356005)(5660300002)(81166007)(1076003)(2616005)(956004)(16526019)(6506007)(26005)(186003)(316002)(6512007)(6666004)(336012)(8936002)(36756003)(2906002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2021 13:31:34.8663 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15dea86f-f39f-4653-02e5-08d8b2476338 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: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3267 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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@sourceware.org Sender: "Libc-alpha" AArch64 always uses pc relative access to static and hidden object symbols, but the config setting was previously missing. This affects ld.so start up code. --- it seems to me that this was missing because of an oversight. i plan to commit this tomorrow unless there are comments. my current plan for bug 27072 is to mark things hidden in static pie libc and then if this macro is defined then reorder the self reloc code after auxv, tunables etc are set up (this requires that nothing depends on ifuncs and global pointers up to that point). sysdeps/aarch64/configure | 5 +++++ sysdeps/aarch64/configure.ac | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure index 1f8223725f..5f5f3cc44c 100644 --- a/sysdeps/aarch64/configure +++ b/sysdeps/aarch64/configure @@ -1,6 +1,11 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/aarch64. +# Static and hidden objects are accessed without dynamic relocations. +# The exception is -mcmodel=large which is unsupported with PIC/PIE. +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + + # We check to see if the compiler and flags are # selecting the big endian ABI and if they are then # we set libc_cv_aarch64_be to yes which causes diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac index da2a8d81d0..180a16a29f 100644 --- a/sysdeps/aarch64/configure.ac +++ b/sysdeps/aarch64/configure.ac @@ -1,6 +1,10 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/aarch64. +# Static and hidden objects are accessed without dynamic relocations. +# The exception is -mcmodel=large which is unsupported with PIC/PIE. +AC_DEFINE(PI_STATIC_AND_HIDDEN) + # We check to see if the compiler and flags are # selecting the big endian ABI and if they are then # we set libc_cv_aarch64_be to yes which causes