From patchwork Wed Jan 27 09:52:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1432102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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@sourceware.org; receiver=) Authentication-Results: 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=Uz0GpFMc; dkim-atps=neutral Received: from sourceware.org (unknown [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 ozlabs.org (Postfix) with ESMTPS id 4DQf6b4LkDz9sVX for ; Wed, 27 Jan 2021 20:52:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61B5E3953C05; Wed, 27 Jan 2021 09:52:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61B5E3953C05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611741173; bh=+IbLFrZOObixCNU/PJv7YcUJdVb2la5G/JmYxgqV9zI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Uz0GpFMci1v13E18woaYVvFbo69N7NFjpWrAy7x6GKF1cNxbe8GbgjjH3ydqZCU1T TubmEailM23+T+7ffUN8fXXELmuLNs2yvAOWhzQwadUA99JfT4zGuuk7QjveQGbWqe /Q1N6HpIIKhI4FtG/8EI3nbxBAkFMmyjgx4ZwuJY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2057.outbound.protection.outlook.com [40.107.20.57]) by sourceware.org (Postfix) with ESMTPS id 7DAB13951C67 for ; Wed, 27 Jan 2021 09:52:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7DAB13951C67 Received: from AM6P191CA0019.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::32) by AM6PR08MB4519.eurprd08.prod.outlook.com (2603:10a6:20b:74::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Wed, 27 Jan 2021 09:52:48 +0000 Received: from AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8b:cafe::a2) by AM6P191CA0019.outlook.office365.com (2603:10a6:209:8b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17 via Frontend Transport; Wed, 27 Jan 2021 09:52:48 +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 AM5EUR03FT018.mail.protection.outlook.com (10.152.16.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Wed, 27 Jan 2021 09:52:48 +0000 Received: ("Tessian outbound e989e14f9207:v71"); Wed, 27 Jan 2021 09:52:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3c074c0761d51a93 X-CR-MTA-TID: 64aa7808 Received: from 13f022ed75c0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 31B21398-3C78-4538-B767-E40316D7061B.1; Wed, 27 Jan 2021 09:52:41 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 13f022ed75c0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Jan 2021 09:52:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Etpy86NjNEHW3+KeuiTDpmMVQYfrtSXaWD0kpxXQNdwduHR6UJcFnKc6qTFcpQ9N6D8bVK9RaGhxRCR1lcq+/rFHmuErzWnSps79hjl1qZQJciyWG7YfKlGr0Ruc3VT93LS+qbFky3zVQhTDd5nTQLR2QCNXz3razVU+FbvO65R/H1/x116CpQZAvcmxhEFDxzk/AUbMol8NiVgf7EO7bmJ8cmNO9kzPL7kI8cCOgXVYwjqQ2KTrFUmt+4FqbVxPv2a4XrcRNiuo5rvJUVYz2DpYgNFWVTz2kECAXqELe0452cZLiT1MezazGB7wBwRBm2B9kkTKPHZBY6tgVoh77g== 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=+IbLFrZOObixCNU/PJv7YcUJdVb2la5G/JmYxgqV9zI=; b=Nt4R1EikKVABoLvE/zTyj/HnBDx+XdKK3L6y2l1j2z8y5oapbE9vW3vBuxUnVOIkjw4sLYH1OpOBLXiNuk5AKkqCoFDAxsDAM4C86aSdk9OwCC9vkIIRF75EGvZf4mKPknCTJ4OmGYmJP0tlKnainVi4hhUNqq5l9k9EZkSYgiKolevyHiYJRgGgLF1snKPGx97EHerw7KAUyyLpAIErdsBR6JT51fMM7c8FWMjFeZhfVEyqj1uWAeyxJPcRRvFyK6vGrWOS+fPBq0FJb4plowmAghZQ0DGqJyv8jhEyhqj8S1VHz2Cp6d3cfhPsQgWMtEIN76YSu/MT4DWzygYeew== 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 PA4PR08MB6271.eurprd08.prod.outlook.com (2603:10a6:102:eb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Wed, 27 Jan 2021 09:52:40 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::941:f3b7:c753:21f8]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::941:f3b7:c753:21f8%5]) with mapi id 15.20.3784.017; Wed, 27 Jan 2021 09:52:39 +0000 To: libc-alpha@sourceware.org Subject: [PATCH] Revert "Make libc symbols hidden in static PIE" [BZ #27237] Date: Wed, 27 Jan 2021 09:52:32 +0000 Message-Id: <20210127095232.28018-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0166.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::34) 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 LO2P265CA0166.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17 via Frontend Transport; Wed, 27 Jan 2021 09:52:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 149642e7-8532-4c8d-c7c8-08d8c2a94dc4 X-MS-TrafficTypeDiagnostic: PA4PR08MB6271:|AM6PR08MB4519: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:608;OLM:608; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qnxgvhN4HxtuImZ8/xnUr6GlcorTaE97eWWi7eMATrdkWkrmsYJmLg/Gt+l1vZc++NyNV8Zso0BVuWSbaKriODwA778OhIEJRlM3KwQs4QL75Vt4Jxc3TmPtGOC3OGhkFZ9r+y1KSV/yafQNUWftkwhsPm3qIOXAjqmna8AgE3MFEjUZcOBaxmOi6jaBife6HU9nsdswfYP+GvOmwVzVxbtqjeF7IKeECwoZBIoQ2ddSZ9NyOO/OJeuw9WQVb9pur+m1Y/FRk5kxn8KyuzEgxk/uAqGx9PCyy+/Ykg1YCGWKsss9WwUR5sLLfQGUdy8Hj//N8yyqU7N599VguJAjJk/wr44hwcrDjiwcVoE+gtHLW+m09xPYqNYIBXmlWr5y+5cYqkQoAmUWS9225dZ1P0ite6fiNzlcPE7542mx28fhyDHJp1ADQt1qtbxPeM8/dd92iid9YJ9k7KeDt7ibnpYaRW++UFBGPAWM4dQJI+KxWCbs7d+ztmxqqi/ADaUA3SOGGrkoxrSy1Mmmxjj9dKOGZlWEZB4WwiZIxsBF8C/22QECmG/x796ZuVu0FWAof4r/DInXaPuy/BYhxQ9FSA== 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)(366004)(136003)(376002)(39860400002)(346002)(6512007)(6916009)(86362001)(2906002)(478600001)(8936002)(6486002)(6666004)(8676002)(4326008)(316002)(6506007)(2616005)(66946007)(66476007)(66556008)(956004)(26005)(1076003)(69590400011)(186003)(36756003)(16526019)(83380400001)(52116002)(5660300002)(44832011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Tix5wG3mkHD1mo2gxCkMmoWCJRheFY0+tFWILrJ/VRI2WAvTzkXdN/pOM0DGTmBF70Zt/w/tNt9dWZIKQDaKUfrYJWLB+Fn2VxD4/o2lk9cMtfLwtmW+P4X/DFgM+HfMRQKUTer32PiwFd/WVB1PKyEYDXI4Q7v6BEMVVkQpI5MD1plOw+QSk1beGpoit69HDqAoXXX7iRLEKrtKc6vI6RU7PYTok+Q2dB5e6rYPzdPvbTDr1l0m2I0kqW9h5Twc0n9yds6q6ifnofL3cYPyVmho4yqWgdCnsYvin74LalmWIiVD4gMljiM1A4DmBnCbs64eJ5IYHFcG82lf7zPg4DvGCW2LHaWy+m5UY1CxNvvLA2JLldly8i6M4EYId78xkYYBJYiN18KIRWLVJPCd/76d9orN3Fr+6oz8bKBkdH1PHdmowPssJ+GOgsSUv9js2nZT6T32opfdOFK5G2No4B146YUEtMlYjuowVTatXPOkiZIaYTyhj7GbHvP6/U4GC5rllBHl5a/Dc5Rsng5oPEQAyjEXjVK6UZ4SMFVBFLUQ0wKfRuFlgDOB7VfplfFx5fAfPADrQPlVSG6V37uMMnsq14FFCeSGQO4y992TxFi/WVtu6BCn8AFg+9uYd3WnY8B1E3ie9n4bcSoykrsvkEHO1ZMfaBeRaQoKCH4eU11JiLmOw8lXblWkxKztt896t0egP3L25fvVZnRATjxTE9gQyjZXHhwKueoPAGaHSfzPDly/E3/06/AbY9IficUc6vJoOSwCTbzVaxV+wrv0UWayoyliLL56AeYqYvzhv8+muTSfugHTEzQKJQdVCdDJgykyQumCuj5eaiT6yyg7vnuZjDOhcE6iM4dltV/MuzH/pqygGGjGc9/rV9xLPSFH0ayhmxxsE8fjrXKXT7jzwwNEMJA2m4ImlsfrJpLZnjSK8OVA480GQs6URymgsizjI9Y7gErouEw7Fv2elVDF4H4v2eN08vDLAVMD/MJpK7woHMRIOoX1Wq+QviC5N2Hy4zROaKvv1ExAKGgXbHm1jm4Jk0538KJZq/I3mr44PJDNSwslJVVi3FCVZPf8TlkG X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6271 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: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 967db7ab-d78a-4738-eff9-08d8c2a9483f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qYqo7oVUwyLQdHw37grhD+p9RIBBaQ8H4R15vkDs1YLvsH8z7zN3StPJ49BnbgZ+/mv8xe3bxtTP9Qazp0kZSLvU34LGzL0IVpcQUZ0jquxh9ERl6uU9pIPO6EIIlukuEHS/NgI2WWtJMYqzUlBo1JnYLeTwhE6gCM7i0X1EuZ46G4qN0vnu1A7/q70CW36b/Zix1aUa9/LcY8XrJGxOCfdn0RHXVCCMPUa3mZtFfqxsMdYf/MJ/MzYKuxVTE2shAXsSLXG+lh/QQ/YCFfAYtbtTkD4mFQSWCii7rVFqFGRuXKjeBB1zGBdBxGHUpD0NmGBkTg/Tq7raLqtVOzwKCST2IyhKV5GqIVAbqzGEt5Cycn3sUEgl9nBhCgSKZdPg+h474caFocF/qKK7VuVe6ls/bpYeH7A88+FqKu8Vker9uYmymh3t8d9mj10MLgfNha2QqKkL46sa8RICjKUcsoJYj8w64r6hvxBxSKscRnU+fKK7rJ8FQ6uN4nXFYfR/VbXIpxrw4i+uHLl0H5q4DfGPWEw89hHxL/n64ETxSIA+PGnajtN7t1MX7l4eQ7Je5nseZ87q6ThHffrq6DJUfoYKUyhigYDoI4FAz+8R8saD8VxoicbDwmwcW1ViYIkr 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)(376002)(346002)(39850400004)(396003)(136003)(46966006)(6916009)(8676002)(6486002)(6512007)(81166007)(4326008)(82310400003)(36756003)(82740400003)(356005)(107886003)(86362001)(5660300002)(69590400011)(44832011)(336012)(70586007)(70206006)(186003)(6506007)(2616005)(956004)(8936002)(47076005)(83380400001)(6666004)(26005)(16526019)(1076003)(316002)(2906002)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2021 09:52:48.2378 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 149642e7-8532-4c8d-c7c8-08d8c2a94dc4 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: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4519 X-Spam-Status: No, score=-14.4 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" This reverts commit 2682695e5c7acf1e60dd3b5c3a14d4e82416262c. Fixes bug 27237. That commit turned out to be too intrusive affecting crt files, test system and benchmark files. They should not be affected, but the build system does not set the MODULE_NAME and LIBC_NONSHARED reliably. --- include/libc-symbols.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index f4dd735555..ea126ae70c 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -434,18 +434,13 @@ for linking") strong_alias(real, name) #endif -#if defined SHARED || defined LIBC_NONSHARED +#if defined SHARED || defined LIBC_NONSHARED \ + || (BUILD_PIE_DEFAULT && IS_IN (libc)) # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_hidden #endif -/* Mark all symbols hidden in static PIE libc to avoid GOT indirections. */ -#if BUILD_PIE_DEFAULT && !defined NO_HIDDEN_EXTERN_FUNC_IN_PIE \ - && IS_IN (libc) && !defined LIBC_NONSHARED -# pragma GCC visibility push(hidden) -#endif - #define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec"))) #define attribute_relro __attribute__ ((section (".data.rel.ro")))