From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7E7883858D1E for ; Fri, 28 Jul 2023 06:18:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E7883858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PHqT9GsOnP2UNPl29DgLTyOQlzjuS7jxSKCMzVSagkrsASzUJ5KQvcY1NVw1FJvyeJc09wVI68qYxvRW2f+9tP2c4j7bZbJZ4z0zFjQHKkVtXdB4usSzEPLhSQlJJdl3QCNfr8ouSdKnhDOnilDp/XiAcTQX0cMbLCdurgh8Fx+6mwwIoD/ArOrsoiL6N3pxAu7l/wJ4/5/m3A0DreYOnQsuvrIQ22Fu0SLXXwaSH9KrM1O+orlVJeIN52O2RoHJT5RM/8DGkvpKh2GEvLvhnx9dnClHT/d1ZvtCWOc875TwH6YAO9RRWh7CAUyHWvozQC0Hbh5/zMCm3/JQ7CUacg== 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=qc6KFFta0KWcXpoacD/HoR43X0A3BWGI3ML3hgXXiog=; b=KsuUZyTGtggb+jvB7VLoHWXTpuNC62ZsFgagzUSNh0bgiXDEyQQE6TxH6W1xrk+f5kmQpnqt1nmmNjR+/5XvZUNnAfIamHVi6oqAPGtlUUg6+SGsYjtqQdaFrpHA98i2FS1paiBvfntXRRt3tcB0MgAdSdAFmNzg43O31w07ke16gSTz7Xdhct0B310eL3TunivYMWv++j6dBPX7FEocQn7Vz2ILVCJ3P143O4GlV3pWjNHkGN0MM/QP73uYzIbrko+LPYB8qqwtdZJOrMpKO8KI9J2/XJXm5AvNFBPyQH3lzeD03d1HiUrQlDp01ky4HZIAmsrISqouIRNtYyrr8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qc6KFFta0KWcXpoacD/HoR43X0A3BWGI3ML3hgXXiog=; b=hCkSXrosW6bIV1K3j9eeuOe8NcBMbTwuXs2V9UG62OcaXIARrcNjbzY6KvBj1Zw7hLlsFvq6LGWWaku2bTr6eO4dvPpscsl6lI+qzgq5vcEOOkwZ9GctJg/2v4h9j9+wKAhfU8SP0rf5TkHYc4H71Fi9NZWp05vYk2atw8y3jMB84wRKxMhbepBfS/lCcLEfNomBcRKWuUP/fQgRvqRv4Q8t9LGVdyD4DgGbXD4DEgrHW2G3fvYIQLEyCW9VxbcXP8f55+8IJJKpaoFoYA6lUFhI4kvCMeoTxEZpEFYzi+ykm8Xe4gJ7uhXFrcBi8gedV8iDeo112cnDgcYGXeaFxw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by DU2PR04MB9210.eurprd04.prod.outlook.com (2603:10a6:10:2f9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Fri, 28 Jul 2023 06:18:51 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e%5]) with mapi id 15.20.6631.026; Fri, 28 Jul 2023 06:18:50 +0000 Message-ID: <5a410132-b62f-b932-cb00-ee6ad0a3a99b@suse.com> Date: Fri, 28 Jul 2023 08:18:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: non-conformant ELF symbol table on MIPS? Content-Language: en-US To: "Maciej W. Rozycki" Cc: Chenghua Xu , Binutils References: From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0054.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4a::18) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|DU2PR04MB9210:EE_ X-MS-Office365-Filtering-Correlation-Id: b1de5902-6231-484b-329c-08db8f32827a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0HYVEGmiDiilZx6yUP7eItEjuBwml37xKrKRZThfsJOzhS+QlBnVZBn3AhwXKIvtSleoCncE6DhyWAE6R1whcnguS9+GoLstqrQAkHni2795g6VsSDdicTuPvU5jDtFq1J7U/nPmL4Pktit9USTYr3SGHbSN5yxpy6y9EsVRii6aIZJFpUgYaVYaLYi4r2S+BrHvZnK43qpBiND21PAVM5i2mUqU51h/MYVtfUwpJEXUVIKZsjfdTuM+CDuW+4H+tgLaIkEWPK50UKgqlDIOedi0dBfjM8oStwCMIN4mESopJKkJCcJfkZ94eZUsjt02+FpNqr3Q/+zCTNO6qCgIeITn2mwdkYyuRbmSm8WyaJ5KGyb191f2QPtd47t9lRxUBn8bwBis21xiMSWlHFzWe9Zlnx52Q6s9me3+MPHWnmCMdnb4Kpx8na3ADhYnuIjvIoOu9THUcz2PtjKAA5yBVi1kBdFA5h3U447xfMohgD9UI7KeVcHaS5vGxnhHXsNHmmjJ8xqmQ52Set/B/w7AFjBxWjdYw7p4JChSBHMuwHl0bmv50cqyCR5SvSw9SjBk14y2EpmUda0I182R+YqNWgyx9ezso7vHrpj7r7fF/nM9ek7ICs6+4s1Wt7VuTNvUkgsGSMy4wfkf+bWV4YF6YQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(346002)(366004)(39860400002)(376002)(396003)(451199021)(316002)(2906002)(8936002)(8676002)(5660300002)(41300700001)(36756003)(31696002)(86362001)(6486002)(478600001)(26005)(6506007)(53546011)(186003)(54906003)(31686004)(2616005)(66946007)(66556008)(83380400001)(6512007)(38100700002)(66476007)(6916009)(4326008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RkE0enUwZDNhSDgwTklpMEQrc0lheGp3cVpLN2tnRks3NkVTQmNURkZOUkdH?= =?utf-8?B?Sk5ndzhHTVZzSU9ZTG1BajZjMk5ZK3kvbG9PZVZmRXF5YkU2L2JGbUF2ZHI3?= =?utf-8?B?OEVHc0xIVmNyZDJUTVlDWllhYXI5Sk1UYzlvUnRQZmQ0SEJiM0RsV3BSM1Mx?= =?utf-8?B?dlhPZ1RkbmVpbVJYanFBMkZ4OFp3ZjRZUGhsRU5jbVg4VVA1eTc1Y1dSQTBa?= =?utf-8?B?aWNPblczWEJnZHJqTjVNa0RxSmlHNXF1TTMyMkJxYm8zVkFhdElvdWE3WkFK?= =?utf-8?B?Z3dKcmtUTTNPc1cxaXBYVzdTWGp6YmhobjhSZWpOaDlubFhQVEdkYzgxU1A1?= =?utf-8?B?QlR0TGZG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rossTenant-Network-Message-Id: b1de5902-6231-484b-329c-08db8f32827a X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2023 06:18:50.4388 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eqhzf+XUNCRlINoqP6kaJlRgl45GLguT3HXGux9hkn4y3xgjbbmWZukU21n7xk2IJdak07K8I+y8ZrzJw5+OXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9210 X-Spam-Status: No, score=-3027.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 27.07.2023 21:28, Maciej W. Rozycki wrote: > On Thu, 27 Jul 2023, Jan Beulich wrote: > >> extending the gas elf/common3.s testcase (in the context of trying to fix >> PR gas/30688) to >> >> .comm foobar,30,4 >> .comm buf1, 5-1, 8 >> .comm buf2, 4, 9-1 >> .lcomm lbuf, 9-1 >> >> I notice a violation of the ELF spec on most (all?) MIPS targets I would >> routinely test for common code changes: "lbuf" is emitted last in the >> symbol table. The spec is quite clear: "In each symbol table, all >> symbols with STB_LOCAL binding precede the weak and global symbols." I >> guess I want/need to xfail that test for mips*-*-* for the time being, >> but it would be nice if you could shed some light on this behavior. > > Which specific MIPS target is it? > > There are two kinds of MIPS targets, ones that use the older IRIX symbol > sorting rules and ones that use the newer "traditional" symbol sorting > rules. The IRIX symbol sorting rules mandate that section symbols precede > all other symbols, see e.g. bfd/elf32-mips.c:mips_elf_sym_is_global. Along the lines of my reply to Ian: This still doesn't explain the behavior I observe. What you say is required could still be met without violating ELF rules. Jan > Mind that SGI was an early adopter of the ELF standard and things weren't > as settled as they are nowadays, hence e.g. the odd solution for composed > relocations with the n64 psABI (later n32 uses standard ELF gABI ones) and > other peculiarities here and there. > > Determining whether a MIPS target uses the IRIX emulation is complex, see > e.g. how binutils/testsuite/binutils-all/mips/mips.exp sets `irixemul'. > If you provide me with test case details (input and output), then I may be > able to give you further advice, but otherwise you may want to mark the > test case with `notarget' or suchlike rather than `xfail', because that's > not a bug with the backend that the symbol ordering varies. > > Maciej