| Message ID | PAWPR08MB8982EA96A85A9846678CCFB5830B2@PAWPR08MB8982.eurprd08.prod.outlook.com |
|---|---|
| State | New |
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9EF34BA7981 for <patchwork@sourceware.org>; Tue, 26 May 2026 18:39:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9EF34BA7981 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=G2NDT59I; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=G2NDT59I X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::1]) by sourceware.org (Postfix) with ESMTPS id 095484BA2E30 for <binutils@sourceware.org>; Tue, 26 May 2026 18:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 095484BA2E30 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 095484BA2E30 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c200::1 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1779820751; cv=pass; b=TH9qm/GIsM2npF2XZGf4tOCIAeVa7ltlXnFSFZ/p21zQt1Kv0HpmzALdIYUl8HPxQv7LdNzsSJ4+E9tNmFJSL1FrdWW5SSGHco6PaOrGFJbFSyHNNMIcWsv2Qm70TDSX1gLcJkZp1F7PSPAs60qMOBt0r/jrAkH+vUsQ/ENhuRE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1779820751; c=relaxed/simple; bh=UMohmJj7UE+kUaOkfw9i+M21qbeLtKE+AcoBfpFW8ZM=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=KkVxoqGSZBZgPrx9cHWLlOy8xDTi/6+IGuH6xBopGKF758Oi8mkTEpfgcTH1jV7gKPt1EIt9d5UBrvGSt9ccw5/jY5cn7taIh3xU3zVKZ/CVOwhwMoXe7FMjcQggA3Yym2TEvdO9nGEZvM5rwiJmBaveKOSO2HIEDieKYC9sV6U= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=G2NDT59I; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=G2NDT59I DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 095484BA2E30 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=d9arO509+dwpOTnIbF/SlTw/oqFlenrZxj0A8xM92o1GglPu2RpHgUBX6ZPNnZ5S1hrDFaPnwHquJh6Pj1BoD1Dji64ktSMyGcb0Fc28vuPi+gnM2AvYYLw3udeWk9rM0o6FgEnY5cFaDu2Ze3AuAtxrXln+gnSQHyc2mSNfh+az3duPjMVz/YBFwdxyTMaMTj3G13HXldjEvEGbQXycYVsscV4EwWB0AusjZlJR+xZ1MxseP6d6OcgAupcxQGfRvygX7zvw9/XI+icRHq34iTyOPoiWZ3HuWQBjyRSF7W2ZefbqOatDvOcaOcFxaDb0lrEJqnezJBJ5Ph2jp/aCAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=OBy78GIrMXze1Hju4FK9t4JpDD9H4J9arVM+52fkSe8=; b=B2/NWsduwz07+jrN80U4YdZ13ZPip4JbSWxjPeVQnI3tKf+z1FLzKp9LcogrnEIxfgs78DypG5JJGCUGUeQnjns6kHNK1F86S5ouXbO2MIQKrOeq8yza8sZh2wS3QVWkO3+3eMFaZCRCJ73XyHgtc/jByMuNLYYTS0inU9HZ5yCwNNfAAck2mbFZl+eX9mC3FZhF+g1SQbh6MXmeVPyE/LAuGgTV3CNHM7xiJ9knKOihxokIhUekkGZqWXoKuyxHL8jGglSl3xEwy6XHuGG66JVnjSz7+CAWTjHgVFcoafW6zJrr5jwt371BdmFWuPejC74R8BjP+gn7OzzV/gRgoA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OBy78GIrMXze1Hju4FK9t4JpDD9H4J9arVM+52fkSe8=; b=G2NDT59Ia+w6hyb3/cfRBwVZAls6zw0HuNtiQlx4k+ienscSl55XoXPkkg9nzHXJKJ17JVsNhguQWQxqhupYXqvg8iMyoDIoUHsPKZ49kdjUXUXsJE/1dq/CxD0bgLMfnqhHxbifsOSXpxO2e3aDrJDyJxlo4NuAqtfur/rgxoY= Received: from DUZPR01CA0116.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bc::15) by AMCPR08MB11972.eurprd08.prod.outlook.com (2603:10a6:20b:771::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.71.11; Tue, 26 May 2026 18:39:02 +0000 Received: from DU6PEPF00009523.eurprd02.prod.outlook.com (2603:10a6:10:4bc:cafe::9d) by DUZPR01CA0116.outlook.office365.com (2603:10a6:10:4bc::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.11 via Frontend Transport; Tue, 26 May 2026 18:39:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DU6PEPF00009523.mail.protection.outlook.com (10.167.8.4) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.7 via Frontend Transport; Tue, 26 May 2026 18:39:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZQ+PCBnvfGJ31sJrptdPQ/i2WSyPbAGNtwthNng9IQn8j0vJHsiOGUgO6eFfNqLnBL4Dha1BIkqMfB3BIVVGeuWyvA1/2QsOwVK2vm699UJPhcmsXDAsl6TxBcrtGWWNwFfBE+YCR+jnG/ZHJ7kDz6K9Od0zlgxiAJUR7RF82qgzedP3lwMPc2vHDk0C399R5bpPxpMyZXXlfry302lHpVNd3ua0LHYvDdk/k5jQJkKJyrMO3FKkrI7kdi/eQ1J5YJ5L/7VM6MqmyDIMAlbtLYG3XPsYW7CpEHJ19jIlJcacfBfTjlkX6NZkgu4uDDv+uy22npyXovb/xu4azmT/QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=OBy78GIrMXze1Hju4FK9t4JpDD9H4J9arVM+52fkSe8=; b=F+DX/R2ijL+XI8JDEgkYbBFh3darhC77SWJE9AUYZGoC8pzAbMGoAPWjAAMgbVqMHkyO/BtNBXbSiSXHtqYHZ9LXiqBb8sI56qdHTk0yAxIr2g3oqhyf5qZdXBfKmClmjtZ+NqIIPkFoORMQBscql2speX5DaprxeVdID+kjCeaZa2Au7inALJKcrIRH9bZPzmJ8hInjvSqMTFno57ETbY0b61XAupg86p9bGK9xX99q4U4PDViCl0trpaPq/lVnb5FRPSfbvHoJH39RA3cAivDXgl/H0Ra7M+DEBUAul9osQ2a2m3QNLT/6ug7KGkNPPAeSVCIF9wflWakXJys+lw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OBy78GIrMXze1Hju4FK9t4JpDD9H4J9arVM+52fkSe8=; b=G2NDT59Ia+w6hyb3/cfRBwVZAls6zw0HuNtiQlx4k+ienscSl55XoXPkkg9nzHXJKJ17JVsNhguQWQxqhupYXqvg8iMyoDIoUHsPKZ49kdjUXUXsJE/1dq/CxD0bgLMfnqhHxbifsOSXpxO2e3aDrJDyJxlo4NuAqtfur/rgxoY= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by MIYPR08MB11946.eurprd08.prod.outlook.com (2603:10a6:290:7b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.20; Tue, 26 May 2026 18:37:58 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::5821:707a:c30b:dd9a]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::5821:707a:c30b:dd9a%5]) with mapi id 15.21.0071.010; Tue, 26 May 2026 18:37:58 +0000 From: Wilco Dijkstra <Wilco.Dijkstra@arm.com> To: Alice Carlotti <Alice.Carlotti@arm.com>, Richard Earnshaw <Richard.Earnshaw@arm.com> CC: "binutils@sourceware.org" <binutils@sourceware.org> Subject: [PATCH] AArch64 gas: Block section relative symbols in GOT relocations [PR30788] Thread-Topic: [PATCH] AArch64 gas: Block section relative symbols in GOT relocations [PR30788] Thread-Index: AQHc7T3zzTXSEKH8okmKCiZWA14I2A== Date: Tue, 26 May 2026 18:37:58 +0000 Message-ID: <PAWPR08MB8982EA96A85A9846678CCFB5830B2@PAWPR08MB8982.eurprd08.prod.outlook.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|MIYPR08MB11946:EE_|DU6PEPF00009523:EE_|AMCPR08MB11972:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f53372f-94d9-4af8-b75d-08debb560ebf x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|366016|1800799024|376014|38070700021|18002099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info-Original: 6fHdwrxMY3wjPhkbV2xu8hEfzZ2pSgzIiSMprT6JaY02L40RO9+ASN9YlAmVBf2DkFcDhaxeMqETA3FTzDOlD0SDQksNtkZDkwmA6RvCvwLEZbnENtfmgSCAvBe2NZAPNz4/NY4c75qk6DrApaTcuqkgWKM/NNwRzwCcqfuUSQ/vFd0DSvQQSovc1ixEX8JHew0FyB/MLUtUAKLoz1Tnh/eHZ59ueREm2fuG2wQS3d4JnkmRsvEs9EDStqnPuWA44uh21GOz1l808A25070l8mhCA+n2JKzi8I8ZSGyQqcK+tYD16BghASTVX3+6t21CSZcCIbxf3whed1ndqg94wtIVvMwd1r1b3g0g0Gb5Pn+m8Ku0UjDoCpenWsIEzvtEGQOvXQEBAG3TqDdLGW5BBwviECddao5cAjUliWbPZVJEkroZlGV0kaeb2ei68cM2q7ODRl5PAUoPOFozmA+j6XUQ3BmTnGhJiHrYNnFHsohsP//4rsOQsT6lLbjJhN/2I9k88dLjAMGsom+j9/u2/SnlGqIrDkPm7ze+l096INjSSUH6awAFAGprPYvvJCnNWUBwlAJ2eVpIVPLQcSUNSLhlQVbLKK+fRzapXT64a/1TL4j07IQ2Q1kMCYxGPk1X+PN1LvV/Dympo5ikn2dO8vrfnWGyPYV4hdeR/Rl5VNB5P1GCWxgNxZezO3tRHtLgPfjIt1hiiPyo09BKOi9ZhvmOQ4yYSWsYzL/CqAdAuivQRZ2stcRNmmnVcjgg9Lxd X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700021)(18002099003)(56012099006)(11063799006); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: W/5/5fMcjhEjcxhNL7GAcevWGpIt21Uu+WrHXYePn0CYdYlVo04JomPVcu1xomm7Y9gZbMp11qjI+k+EZloM8rhEpdgEnPKuKmx7WZ+7cFvuj8hc5Iip2D1eL2rQCoGK35E9tZgQpfPvQFJTkCbg5vrd5N0cbqjeqyCOClf9lLCo/2DdsxqJqwxDGJqfeOuWE7sTUI2R2UDcPPc+ra9bvaqsSt4Pr7CxaDyM/BuD1+45izVzCnBuWKNqNoxGWhgnQtqiVQb+PoeMLKa7wYUD/I2knyhhO6inC3+TljdgCcrhRgFYqR5tkLuDzveRb2tI7zCXUCa1t70mEI/dzdXXHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MIYPR08MB11946 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF00009523.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a563787-575d-4356-01f4-08debb55e883 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700016|82310400026|1800799024|14060799003|35042699022|18002099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: uCyARjhyAkiJzr9Z97fbPSMTUsq6287LmAegRLFwmdHNCnMpvjUxFU9nzkBT//XHMLArK8azMdl+qjFywBP+fIuod2mW5LlYA1s2kEiAamK6FBhBHoGWqqqXHZJIYK6bdDT+Fh+0CBvH+HRHxtE7Sv9K035vi/bLmAwQtM14x0nh24rf2JA2mqEVsYhPvTIMVuNRF9/T0Ke2Ie+ph51fSdYKjp6V7WocxnM4Vdi3Y3RvX+6XxIJ/8yOo3JdRAr0lbIMIcbTPjUCDlRHyX4wacykwBNbwKoNJrXVOjmq2N/kmWd1twLgtdCLbhEWNsUGaM+w+nhya+lcQ9Fat9oOkTy3VqBgiomaDdCU65QWusS8NXz9rGVgpqfTYFBuftfPqP8/PN6GGIxfZAihIC1f4LLRUgua9syWcBA8BP+mJ5bBws1lz8WElwUTnaKDf/0M8otvn5Y/H/4SNbepAXU5EP7J5QitOS4ej7FvWHencq0JuUReT3N8UWQ7qq8oECoAmlvthibf4vgJdmIOKxXS5NtSZG60482uwgWlQeSPj33LIsBuFF/HCiKRv5ezBxkq72RIORTFblK1eHGow2IZqPVkh+A5pmu+4AD2wti4+c1QeRqD4c4hpSTQGsFFyTvCWaytOMeLezG7rnnwg+oEFBSuUcbS1dnvgl7rimjGBEyol0ktbJKEHLSyAkEquJMQvu4BCwIjWezyjhgPUEmZQpGaeL+z4O6OfbqUSGXp09m8= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700016)(82310400026)(1800799024)(14060799003)(35042699022)(18002099003)(56012099006)(11063799006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0JddK59EBLyrOsTd58PIs92OsC+VO5TeYX4cRVwBd6ydWtaBoxICLhJIzRtHvsOt9j5ivVc7Nrmc/El+5Oo9Ym/UCt4ioCIbAnkfEQ2yAFB4I23GmI5auJXqeIPh4Dha0HFEyA7RAW3JMBvve2JCCeu9GvrLwrIfBkrrDIZ5R7Dc3sWCJm2j5PtADsAzMfPWDJr2Ux67JeozFXI2vvcoqrai7ovfGn/lOG8ekBcpGuUVfmQSWN5chgY61lwPQz8PNPgYWwUoCU90lzIGQ21bTkn9poXgJ2HETlCgGGig3NhL8wJZkAR8+qnnVS85An89tkWBoDJe6ruWJj5x8B05rXZjXwpy6h28dROUGALfiFz3fkAIBAQZdlHHmJl7fIm/5nfnC4zOZp433UIEJuSvSRUD6cQ2nP4ABLTrsMheWpf88bVPR5w3ME/E9+6uILga X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2026 18:39:02.1860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f53372f-94d9-4af8-b75d-08debb560ebf X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF00009523.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMCPR08MB11972 X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP, URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
AArch64 gas: Block section relative symbols in GOT relocations [PR30788]
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
| linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Wilco Dijkstra
May 26, 2026, 6:37 p.m. UTC
By default, GAS changes GOT relocations of local symbols into section relative. This is incorrect since GOT relocations do not support offsets. Update aarch64_fix_adjustable() to explicitly disallow this for GOT relocations. This fixes PR30788. ---
Comments
On 26/05/2026 19:37, Wilco Dijkstra wrote: > > By default, GAS changes GOT relocations of local symbols into section relative. > This is incorrect since GOT relocations do not support offsets. Update > aarch64_fix_adjustable() to explicitly disallow this for GOT relocations. > This fixes PR30788. > > --- > > diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c > index fb58bcca9b1059e5d4d831a0a8ea9a33d05deaba..9632a5b2a015b38f2d35fa2f569093b9b52790f9 100644 > --- a/gas/config/tc-aarch64.c > +++ b/gas/config/tc-aarch64.c > @@ -10389,6 +10389,19 @@ aarch64_fix_adjustable (fixS *fixp) > if (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION) > return false; > > + /* GOT relocations cannot have an offset or use section-relative symbols. */ > + if (fixp->fx_r_type == BFD_RELOC_AARCH64_ADR_GOT_PAGE > + || fixp->fx_r_type == BFD_RELOC_AARCH64_GOT_LD_PREL19 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G1) > + return false; > + > return true; > } > The Arm equivalent of this function also has checks for TLS and VTABLE relocs as well. Do we need something similar here? R. > diff --git a/gas/testsuite/gas/aarch64/reloc-insn.d b/gas/testsuite/gas/aarch64/reloc-insn.d > index dc73bd2832a2e802fa93b99f733752ee453d9826..3fcb28dce3c2b864643f5a189b8cd4fadb91b64f 100644 > --- a/gas/testsuite/gas/aarch64/reloc-insn.d > +++ b/gas/testsuite/gas/aarch64/reloc-insn.d > @@ -159,9 +159,9 @@ Disassembly of section \.text: > 18c: 39400001 ldrb w1, \[x0\] > 190: d65f03c0 ret > 194: f94001bc ldr x28, \[x13\] > - 194: R_AARCH64_LD64_GOTPAGE_LO15 \.data > + 194: R_AARCH64_LD64_GOTPAGE_LO15 dummy > 198: f9400000 ldr x0, \[x0\] > - 198: R_AARCH64_LD64_GOTOFF_LO15 .data > + 198: R_AARCH64_LD64_GOTOFF_LO15 dummy > > 000000000000019c <llit>: > 19c: deadf00d \.word 0xdeadf00d >
Hi Richard,
> The Arm equivalent of this function also has checks for TLS and VTABLE relocs as well. Do we need something similar here?
TLS is already checked separately in adjust_reloc_syms().
I don't believe any other GOT relocations are supported for AArch64. The list in
bfd/bfd.h does not cover eg. R_AARCH64_GOTPCREL32, neither is there any
assembler syntax defined for data relocations involving the GOT.
Cheers,
Wilco
> On 26 May 2026, at 20:37, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote: > > > By default, GAS changes GOT relocations of local symbols into section relative. > This is incorrect since GOT relocations do not support offsets. Update > aarch64_fix_adjustable() to explicitly disallow this for GOT relocations. > This fixes PR30788. Thanks for the patch. I believe this patch should also address a regression we saw with GCC’s recent -mcmodel=large changes. So I’d like to see it in trunk and on the release branch if possible so users can pick it up. Kyrill > > --- > > diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c > index fb58bcca9b1059e5d4d831a0a8ea9a33d05deaba..9632a5b2a015b38f2d35fa2f569093b9b52790f9 100644 > --- a/gas/config/tc-aarch64.c > +++ b/gas/config/tc-aarch64.c > @@ -10389,6 +10389,19 @@ aarch64_fix_adjustable (fixS *fixp) > if (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION) > return false; > > + /* GOT relocations cannot have an offset or use section-relative symbols. */ > + if (fixp->fx_r_type == BFD_RELOC_AARCH64_ADR_GOT_PAGE > + || fixp->fx_r_type == BFD_RELOC_AARCH64_GOT_LD_PREL19 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15 > + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOT_LO12_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC > + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G1) > + return false; > + > return true; > } > > diff --git a/gas/testsuite/gas/aarch64/reloc-insn.d b/gas/testsuite/gas/aarch64/reloc-insn.d > index dc73bd2832a2e802fa93b99f733752ee453d9826..3fcb28dce3c2b864643f5a189b8cd4fadb91b64f 100644 > --- a/gas/testsuite/gas/aarch64/reloc-insn.d > +++ b/gas/testsuite/gas/aarch64/reloc-insn.d > @@ -159,9 +159,9 @@ Disassembly of section \.text: > 18c: 39400001 ldrb w1, \[x0\] > 190: d65f03c0 ret > 194: f94001bc ldr x28, \[x13\] > - 194: R_AARCH64_LD64_GOTPAGE_LO15 \.data > + 194: R_AARCH64_LD64_GOTPAGE_LO15 dummy > 198: f9400000 ldr x0, \[x0\] > - 198: R_AARCH64_LD64_GOTOFF_LO15 .data > + 198: R_AARCH64_LD64_GOTOFF_LO15 dummy > > 000000000000019c <llit>: > 19c: deadf00d \.word 0xdeadf00d >
ping
On 27/05/2026 14:07, Wilco Dijkstra wrote: > Hi Richard, > >> The Arm equivalent of this function also has checks for TLS and VTABLE relocs as well. Do we need something similar here? > > TLS is already checked separately in adjust_reloc_syms(). > > I don't believe any other GOT relocations are supported for AArch64. The list in > bfd/bfd.h does not cover eg. R_AARCH64_GOTPCREL32, neither is there any > assembler syntax defined for data relocations involving the GOT. > > Cheers, > Wilco After some extensive archaeology it's now clear that we don't care about the VTABLE stuff. In fact, I'm amazed that we didn't expunge that entirely some years ago - we certainly blew away all the tests for it. OK. R.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index fb58bcca9b1059e5d4d831a0a8ea9a33d05deaba..9632a5b2a015b38f2d35fa2f569093b9b52790f9 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -10389,6 +10389,19 @@ aarch64_fix_adjustable (fixS *fixp) if (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION) return false; + /* GOT relocations cannot have an offset or use section-relative symbols. */ + if (fixp->fx_r_type == BFD_RELOC_AARCH64_ADR_GOT_PAGE + || fixp->fx_r_type == BFD_RELOC_AARCH64_GOT_LD_PREL19 + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD_GOT_LO12_NC + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOT_LO12_NC + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15 + || fixp->fx_r_type == BFD_RELOC_AARCH64_LD64_GOT_LO12_NC + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC + || fixp->fx_r_type == BFD_RELOC_AARCH64_MOVW_GOTOFF_G1) + return false; + return true; } diff --git a/gas/testsuite/gas/aarch64/reloc-insn.d b/gas/testsuite/gas/aarch64/reloc-insn.d index dc73bd2832a2e802fa93b99f733752ee453d9826..3fcb28dce3c2b864643f5a189b8cd4fadb91b64f 100644 --- a/gas/testsuite/gas/aarch64/reloc-insn.d +++ b/gas/testsuite/gas/aarch64/reloc-insn.d @@ -159,9 +159,9 @@ Disassembly of section \.text: 18c: 39400001 ldrb w1, \[x0\] 190: d65f03c0 ret 194: f94001bc ldr x28, \[x13\] - 194: R_AARCH64_LD64_GOTPAGE_LO15 \.data + 194: R_AARCH64_LD64_GOTPAGE_LO15 dummy 198: f9400000 ldr x0, \[x0\] - 198: R_AARCH64_LD64_GOTOFF_LO15 .data + 198: R_AARCH64_LD64_GOTOFF_LO15 dummy 000000000000019c <llit>: 19c: deadf00d \.word 0xdeadf00d