From patchwork Wed Jun 24 10:37:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 137711 Return-Path: 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 5E8484BA2E12 for ; Wed, 24 Jun 2026 10:39:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E8484BA2E12 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=V2jOcdPQ X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 2D8874BA5434 for ; Wed, 24 Jun 2026 10:38:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D8874BA5434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2D8874BA5434 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1782297515; cv=pass; b=TM5hVX7B3C3fOtXkJCjWH1T7L3YpkA6vXm+hajP0x3osjr/hniOm8o07GH265lOLPmNRuZUOYeAKCJ3FKe4GVk4/Xe/o5mOBJxNmO/3xMaXWSN/aj1OLabVo6kmNH+t/buijxp4GQP5jGPeLchAlTolpHm58RcmavP4wg/0VHdU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1782297515; c=relaxed/simple; bh=10iq+shDU14nemCMvlbBL79yxiTb+BeCn4tXLDSs8DE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=uSIsp+Xd316wzk9zVEoPR/TiliBSV5oqmHqvpocqJ+y7m0u9dJ51zUkyM8dzJxi6kQLJ1lILLd0ZjQFH2vK4kNkvNs3M4pLE0UUrP1okZNvQWFcYv9ccmVijdIda9ObBLwQ/grepV7/Tejrv5MEG7qq+A61mlZNK/5Lxekc00fc= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=V2jOcdPQ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D8874BA5434 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2bf2247e38eso8591695ad.3 for ; Wed, 24 Jun 2026 03:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782297514; cv=none; d=google.com; s=arc-20240605; b=ipJrt6yBaqHMI2ujegC+nqX7S6HfkzjwMrh6FLFBWqw9EXPAr0e2pZ9dG9BtvdQj50 AElF4GyW0pIEjmXpq57lr0m4sSsY2vs1wAB2tqg92oHJv6kLWBYb+nvpmWXgdrAZeTmm 0XUnj0W3GcAe8KC3NDmpoIdiYU9Z3v9+a6Vd96aN0wbym3QXjjmkb9ClBWPl73eC9cjK oMP4+p65w3DugbCTku+dv5ryrBexTVM8SNneW+qXyrbYu12FFBIKliKMIK1s61wBTVTE XEAstol8EA53USSSxnK76vmLK/Z7lUsDrwtO880TXqoRqhe2pCLuwBbj0xleExCjKqYG Ywow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=pp4tZXIdoN07rLtJJTYaVsr+M26bsVMHRrqM0hAlaIc=; fh=0r7/Qmp1P5s8GQNdisAYlJ1DZygbtvgOOf3P8fDpBG4=; b=ciqhcDedndRVpjkSA7QXzgwW8d4GL88OSemFt5iy79ulsNtqfKcb+5G+XXLRbRCPx4 pI9VyoP9uQ/aGy0JMJKhqkTOIo9AlwG/5Uv1PdXjsOk5mCzz5PuxRkhxRA51AqwE6Zvz MQfCU8e9sgMme2bKyiJhiEPPzYFBGCWnu8tPVAYiz7pVhU+y8hJbe6zdOVhi5Inhh7VR QKDNfyYjAMz31GmhMhYdYx5gfWYpXd8/ZIMmj8ffr57i3VxfnJQ3d9vtM1ETO4w0mBde T0uU3RkI4MqIHbi8uGtyqVMxaKFRG+dCAjczl8GYFOKwX8tVijsiC2o5nqI067VmP/Sy 8ODw==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782297514; x=1782902314; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pp4tZXIdoN07rLtJJTYaVsr+M26bsVMHRrqM0hAlaIc=; b=V2jOcdPQXLUD/NBea/0+qHOvsbRrn+T8Q7FIerKQu6ZZgwfgkD1WjNB3jzJWe3582l eIkEoK839tgcEWZ+9JvBhdeh6yNeQS7S/2CFoRWKxbFEcFDqed7zxNDQdUAfcSTHACmd 38kaswQvLNDLXRH6aiEI0TkkK+Y8cfaRFQQHo3dDH91d/JaG2zl/Yijd8ZzDq9RJAdMu jdEHwuBo6aFrT8mlrX4PMzpigKJLpFxgskd4p6a41FrtnUs5yLRaxKQj+THKr9xzpYiw mE3a0oUvUniLIB/CqEgtmNFAMrlIgDYnxDDLwyvXppS5OS6PMiJl/BERTaeomdOs8VDn SotA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782297514; x=1782902314; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pp4tZXIdoN07rLtJJTYaVsr+M26bsVMHRrqM0hAlaIc=; b=ribJy11o0o9rOZASGiyiyX1irB25cT0+1Ht5jP3qwxLsOmQ6Zw7JEoeRCxT/1N/Z0Z Dul2Hw3UEUp6sbGdOuMO9RHvzW3XoFC6Qev9FvnulACc/hGsNpz6Mc/ClC44T1hhdeR2 cl+CttuLy8n3kw2cCkWURI9801z1FqphEXLK04M7l6gm6kTx1GOUcJulz4OFTkZzqXtr PsEgS7abf9eR6pNMYzEIDo7fTwsxcjkdF5LR61ICcgbbsYNyKOPHO0JPyQhXO+q2Bi9q ATtt1SXhjRHANXuusyVzHjjfjPO4uknC0eQXrwqPHN2dT7bBfnCs18flhAF2JAECVq4c utww== X-Forwarded-Encrypted: i=1; AHgh+RpQ/GnyIHDntyKtaA08LoOdyaq1kkQFFwmQAa6+7ho4LZ3zo9y9we2KsBxqVQVZp+8WEe5d86N66w==@sourceware.org X-Gm-Message-State: AOJu0Yz3H006/3gofiuf7b/pZQ8Ukiek7c92jBaEyqNeJ7LICdgkt6/4 h76P6Iq8XxZwWnu5EpJsd6PHz5l4CMUCA03ktxrrryIrZHS6MF49jXlUveScJuFZeS+dgGRux4a Lb5+074DLiV+eqrDpmzJo5xx1740wncA= X-Gm-Gg: AfdE7ckGqpzdBFGIrJ0zd/6ZYS1KWeRpDqDW86fl3x8hO1rdNro649va87jm2R7hXIY E7QBaUZDy+8QLdX8tD11/E7AEc9Vuj6/wQzh/p4devwDnwMYxpJd6ysjwsB6C9Fm6+J4AAFNQwm W0FoYqhvtCIqX1Xtesn67ccWT7SmsemTOL/W4aQpssleE/qsk75kEgpbG77d9aEXJl72UQMVGXK YVbvheGI6w5uRLbLyDMLJ7Md1leOvxMGA1G0sFr63YCbx3dXC4YvZto3exOZshmDzWdvCA= X-Received: by 2002:a17:903:2985:b0:2c0:af09:f3c7 with SMTP id d9443c01a7336-2c7e156ae86mr29890195ad.30.1782297514019; Wed, 24 Jun 2026 03:38:34 -0700 (PDT) MIME-Version: 1.0 References: <193f86ed-f34b-4da8-9eac-68005830d369@suse.com> <1397563c-32ca-4343-9587-99c197dd4029@suse.com> <67a1182c-e7d0-40ad-98ec-9b49c1d28410@suse.com> <17f9a3cc-7994-ad25-692b-e3e9441ff481@suse.de> <3d038b03-8b0f-46c5-a663-d1eacebaa6c9@suse.com> <888a0461-7875-411b-bde9-dd7960e1536e@suse.com> In-Reply-To: From: "H.J. Lu" Date: Wed, 24 Jun 2026 18:37:57 +0800 X-Gm-Features: AVVi8CcTSCaTiRZXNhrGj6a68m-19rzEvnvjJ_f2NE8QaeZ86a3gHEwrMZ96Rps Message-ID: Subject: [PATCH v2] gas/ELF: Allow local symbol with non-protected visibility To: Jan Beulich Cc: Michael Matz , "Richard Earnshaw (foss)" , Chenghua Xu , Zhensong Liu , Richard Earnshaw , Alice Carlotti , Joseph Myers , Binutils , Nick Clifton , Alan Modra X-Spam-Status: No, score=-3009.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org On Wed, Jun 24, 2026 at 1:59 PM Jan Beulich wrote: > > On 24.06.2026 02:23, H.J. Lu wrote: > > On Tue, Jun 23, 2026 at 10:22 PM Jan Beulich wrote: > >> > >> On 23.06.2026 15:54, Michael Matz wrote: > >>> On Tue, 23 Jun 2026, Jan Beulich wrote: > >>>>> I think that's a misinterpretation. "a symbol is protected" is different > >>>>> from "a symbol has STV_PROTECTED visibility". The former is defined in > >>>>> the section for the latter: > >>>>> > >>>>> A symbol defined in the current component is protected if it is visible > >>>>> in other components but cannot be preempted. Any reference to such a > >>>>> symbol from within the defining component must be resolved to the > >>>>> definition in that component, even if there is a definition in another > >>>>> component that would interpose by the default rules. A symbol with > >>>>> STB_LOCAL binding will not have STV_PROTECTED visibility. > >>>>> > >>>>> and _that definition_ is invoked by STV_HIDDEN: > >>>>> > >>>>> A symbol defined in the current component is hidden if its name is not > >>>>> visible to other components. Such a symbol is necessarily protected. > >>>>> > >>>>> IMHO it's clear that a symbol hence "can be protected" without having its > >>>>> visibility be STV_PROTECTED. Namely when it is STV_HIDDEN: its then > >>>>> protected _and_ hidden (which is of course redundant, because hidden > >>>>> implies protected, but as we are word-smithing, lets be precise). > >>>>> > >>>>> That a STB_LOCAL symbol cannot have STV_PROTECTED visibility doesn't > >>>>> transfer to STV_HIDDEN from this wording, and from nothing else either, > >>>>> conceptually binding and visibility are orthogonal concepts and this > >>>>> specific disallowance for the STB_LOCAL+STV_PROTECTED combination is ... > >>>>> well, specific. That is the wart, not that STB_LOCAL+STV_HIDDEN was > >>>>> "forgotten" to be disallowed. > >>>> > >>>> IOW what you're suggesting as interpretation is that while STV_PROTECTED > >>>> and STB_LOCAL may not combine, the visibility-wise more restricting > >>>> STV_HIDDEN may combine with STB_LOCAL? > >>> > >>> Yes. > >>> > >>>> Make no sense to me, I'm afraid. > >>> > >>> That may be, and I agree that creating such situation willingly would > >>> be suspect. But as we just saw, such combinations might be created > >>> by an unlucky reality. > >> > >> Because of shortcomings in the tools used. I bet if there had been a > >> warning, the approach chosen would have been a different one. (The > >> approach chosen also isn't portable to non-ELF targets.) > >> > >>> And again: binding and visiblity are _orthogonal_. > >>> One is for link-editing, the other for runtime linking. In principle all > >>> combinations are "okay" (if questionable), and have obvious > >>> implementations. But it's only that specific combination > >>> STB_LOCAL+STV_PROTECTED that is explicitely made ill-formed in the spec > >>> (despite it being also obviously implementable). So, sure, warning on > >>> that combination can be done on the grounds of following the spec. But no > >>> other combination is so spelled out, so there's no basis for trying to > >>> disallow them. > >> > >> As with many things in specs, what's spelled out and what's implied > >> is a matter of interpretation. As I think follows from earlier replies, > >> I can see that there is room for interpretation here, and hence mine > >> may not match what was intended. Yet we won't know for any other > >> interpretation either, seeing the state the ELF spec is in. > >> > >> If others are in favor of following your interpretation, then I'm not > >> going to stand in the way. But as of now it's not going to be me to > >> make a patch to that effect. I simply couldn't write a description > >> for it in good faith. > >> > >>>> (And would also make the implementation harder.) > >>> > >>> If a warning is too costly to implement, then it shouldn't be there. > >>> Though it seems surprising that checking for "is_local && is_protected" > >>> should be materially more difficult than for "is_local && !is_default_vis". > >>> (I haven't looked at the concrete patch, though). > >> > >> Well, you may be right and it's not really more complex. > >> > >> Jan > > > > Here is the patch. > > The "& ~STV_HIDDEN" is clearly bogus there. If we follow that alternative > interpretation of the spec, no warning should be issued for STV_INTERNAL > either. I'm also surprised you don't undo more of the respective testsuite > changes then (i.e. about everywhere I had added .global to avoid the > warning). > > Jan Here is the v2 path to partially revert: commit c4150acbda1b3ce0602f79cbb7700b39e577be7e Author: Jan Beulich Date: Fri May 8 11:45:04 2026 +0200 gas/ELF: warn upon non-default visibility of local symbols and update elf_adjust_symtab to only warn local symbol with protected visibility. From 4178c82b7401bca7c62f4790d5b8c555b38db1c0 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 24 Jun 2026 08:09:56 +0800 Subject: [PATCH v2] gas/ELF: Allow local symbol with non-protected visibility In the source code extracted from glibc: extern void _dl_sysinfo_int80 (void) __attribute__ ((visibility ("hidden"))); asm (".text\n\t" ".type _dl_sysinfo_int80,@function\n" "_dl_sysinfo_int80:\n\t" "int $0x80;\n\t" "ret"); uintptr_t foo () { return (uintptr_t) _dl_sysinfo_int80; } _dl_sysinfo_int80 is a local function, but it is defined in an asm statement. Since it is referenced in C, it is declared as hidden, which leads to an assembler warning: Warning: local symbol `_dl_sysinfo_int80' has non-default visibility Symbol binding and visiblity are orthogonal. One is for link-editing, the other for runtime linking. In principle, all combinations are "okay" (if questionable), and have obvious implementations. But it's only that specific combination STB_LOCAL+STV_PROTECTED that is explicitely made ill-formed in the spec (despite it being also obviously implementable). Warning on that combination can be done on the grounds of following the spec. But no other combination is so spelled out, so there's no basis for trying to disallow them. Partially revert: commit c4150acbda1b3ce0602f79cbb7700b39e577be7e Author: Jan Beulich Date: Fri May 8 11:45:04 2026 +0200 gas/ELF: warn upon non-default visibility of local symbols and update elf_adjust_symtab to only warn local symbol with protected visibility. binutils/ PR gas/34312 * testsuite/binutils-all/localize-hidden-1.l: Adjusted. * testsuite/binutils-all/nm-ver.s: Revert commit c4150acbda1. gas/ PR gas/34312 * config/obj-elf.c (elf_adjust_symtab): Allow local symbol with non-protected visibility. * testsuite/gas/elf/visibility.l: Adjusted. * testsuite/gas/i386/tlsnopic.s: Revert commit c4150acbda1. ld/ PR gas/34312 * testsuite/ld-aarch64/ifunc-21.s: Revert commit c4150acbda1. * testsuite/ld-aarch64/ifunc-21.s: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1.s: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.dd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.dd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.dd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.dd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. Signed-off-by: H.J. Lu --- .../binutils-all/localize-hidden-1.l | 4 +-- binutils/testsuite/binutils-all/nm-ver.s | 2 -- gas/config/obj-elf.c | 7 ++-- gas/testsuite/gas/elf/visibility.l | 4 +-- gas/testsuite/gas/i386/tlsnopic.s | 1 - ld/testsuite/ld-aarch64/ifunc-21.s | 1 - ld/testsuite/ld-tic6x/shlib-1.rd | 28 ++++++++------- ld/testsuite/ld-tic6x/shlib-1.s | 1 - ld/testsuite/ld-tic6x/shlib-1b.rd | 28 ++++++++------- ld/testsuite/ld-tic6x/shlib-1r.dd | 2 +- ld/testsuite/ld-tic6x/shlib-1r.rd | 28 ++++++++------- ld/testsuite/ld-tic6x/shlib-1rb.dd | 2 +- ld/testsuite/ld-tic6x/shlib-1rb.rd | 28 ++++++++------- ld/testsuite/ld-tic6x/shlib-noindex.rd | 28 ++++++++------- ld/testsuite/ld-tic6x/static-app-1.rd | 35 ++++++++++--------- ld/testsuite/ld-tic6x/static-app-1b.rd | 35 ++++++++++--------- ld/testsuite/ld-tic6x/static-app-1r.dd | 2 +- ld/testsuite/ld-tic6x/static-app-1r.rd | 33 ++++++++--------- ld/testsuite/ld-tic6x/static-app-1rb.dd | 2 +- ld/testsuite/ld-tic6x/static-app-1rb.rd | 33 ++++++++--------- 20 files changed, 156 insertions(+), 148 deletions(-) diff --git a/binutils/testsuite/binutils-all/localize-hidden-1.l b/binutils/testsuite/binutils-all/localize-hidden-1.l index 2ae5910037b..b14b766009e 100644 --- a/binutils/testsuite/binutils-all/localize-hidden-1.l +++ b/binutils/testsuite/binutils-all/localize-hidden-1.l @@ -1,4 +1,2 @@ [^:]*: Assembler messages: -[^:]*: Warning: local symbol .Lhidden. has non-default visibility -[^:]*: Warning: local symbol .Linternal. has non-default visibility -[^:]*: Warning: local symbol .Lprotected. has non-default visibility +[^:]*: Warning: local symbol .Lprotected. has protected visibility diff --git a/binutils/testsuite/binutils-all/nm-ver.s b/binutils/testsuite/binutils-all/nm-ver.s index a8803c1651a..e68c45a9dfd 100644 --- a/binutils/testsuite/binutils-all/nm-ver.s +++ b/binutils/testsuite/binutils-all/nm-ver.s @@ -1,7 +1,5 @@ .symver foo_old,foo@VER_1 - .global "foo@VER_1" .hidden foo_old - .global foo_old foo_old: .dc.b 0 diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 6850cab1902..2e15b25150b 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2756,9 +2756,12 @@ elf_adjust_symtab (void) const asymbol *bfdsym = symbol_get_bfdsym (symp); elf_symbol_type *elfsym = elf_symbol_from (bfdsym); - if (ELF_ST_VISIBILITY (elfsym->internal_elf_sym.st_other) + /* Allow local symbol with non-protected visibility: + https://sourceware.org/bugzilla/show_bug.cgi?id=34312 */ + if ((ELF_ST_VISIBILITY (elfsym->internal_elf_sym.st_other) + == STV_PROTECTED) && !(bfdsym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE))) - as_warn (_("local symbol `%s' has non-default visibility"), + as_warn (_("local symbol `%s' has protected visibility"), S_GET_NAME (symp)); } diff --git a/gas/testsuite/gas/elf/visibility.l b/gas/testsuite/gas/elf/visibility.l index 4abd55d9ff5..8933defb910 100644 --- a/gas/testsuite/gas/elf/visibility.l +++ b/gas/testsuite/gas/elf/visibility.l @@ -3,6 +3,4 @@ [^:]*:5: Warning: visibility of .gd. is already .internal. [^:]*:21: Warning: visibility of .ge. is already .hidden. [^:]*:26: Warning: visibility of .we. is already .hidden. -[^:]*: Warning: local symbol .li. has non-default visibility -[^:]*: Warning: local symbol .lh. has non-default visibility -[^:]*: Warning: local symbol .lp. has non-default visibility +[^:]*: Warning: local symbol .lp. has protected visibility diff --git a/gas/testsuite/gas/i386/tlsnopic.s b/gas/testsuite/gas/i386/tlsnopic.s index 596e6288f63..3a8b794195d 100644 --- a/gas/testsuite/gas/i386/tlsnopic.s +++ b/gas/testsuite/gas/i386/tlsnopic.s @@ -2,7 +2,6 @@ .globl baz .hidden baz .globl var - .globl var2 .hidden var2 bar: .long 27 baz: .long 29 diff --git a/ld/testsuite/ld-aarch64/ifunc-21.s b/ld/testsuite/ld-aarch64/ifunc-21.s index 5e7c315b5e9..a1563dcbbdd 100644 --- a/ld/testsuite/ld-aarch64/ifunc-21.s +++ b/ld/testsuite/ld-aarch64/ifunc-21.s @@ -1,6 +1,5 @@ .text .type ifunc, @gnu_indirect_function - .global ifunc .hidden ifunc ifunc: ret diff --git a/ld/testsuite/ld-tic6x/shlib-1.rd b/ld/testsuite/ld-tic6x/shlib-1.rd index e8181604f27..cf1f34689f1 100644 --- a/ld/testsuite/ld-tic6x/shlib-1.rd +++ b/ld/testsuite/ld-tic6x/shlib-1.rd @@ -16,7 +16,7 @@ Section Headers: \[11\] \.neardata PROGBITS 10000128 002128 000008 00 WA 0 0 4 \[12\] \.bss NOBITS 10000130 002130 000004 00 WA 0 0 4 \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00 0 0 1 - \[14\] \.symtab SYMTAB 00000000 00214c 000190 10 15 19 4 + \[14\] \.symtab SYMTAB 00000000 00214c 0001b0 10 15 21 4 \[15\] \.strtab STRTAB .* \[16\] \.shstrtab STRTAB .* Key to Flags: @@ -90,7 +90,7 @@ Symbol table '\.dynsym' contains 12 entries: 10: 10000128 4 OBJECT GLOBAL DEFAULT 11 a 11: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub -Symbol table '\.symtab' contains 25 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008000 0 SECTION LOCAL DEFAULT 1.* @@ -106,14 +106,16 @@ Symbol table '\.symtab' contains 25 entries: 11: 10000128 0 SECTION LOCAL DEFAULT 11.* 12: 10000130 0 SECTION LOCAL DEFAULT 12.* 13: 00000000 0 SECTION LOCAL DEFAULT 13.* - 14: 10000080 0 FUNC LOCAL DEFAULT 9 sub1 - 15: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC - 16: 10000130 4 OBJECT LOCAL DEFAULT 12 c - 17: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ - 18: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE - 19: 00000000 0 NOTYPE WEAK DEFAULT UND b - 20: 00000000 0 NOTYPE WEAK DEFAULT UND g1 - 21: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 - 22: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 - 23: 10000128 4 OBJECT GLOBAL DEFAULT 11 a - 24: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub + 14: 00000000 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 15: 10000080 0 FUNC LOCAL HIDDEN 9 sub1 + 16: 00000000 0 FILE LOCAL DEFAULT ABS + 17: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 18: 10000130 4 OBJECT LOCAL DEFAULT 12 c + 19: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 20: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE + 21: 00000000 0 NOTYPE WEAK DEFAULT UND b + 22: 00000000 0 NOTYPE WEAK DEFAULT UND g1 + 23: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 + 24: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 + 25: 10000128 4 OBJECT GLOBAL DEFAULT 11 a + 26: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub diff --git a/ld/testsuite/ld-tic6x/shlib-1.s b/ld/testsuite/ld-tic6x/shlib-1.s index 7d2f4c016ea..058bcbc69ff 100644 --- a/ld/testsuite/ld-tic6x/shlib-1.s +++ b/ld/testsuite/ld-tic6x/shlib-1.s @@ -1,7 +1,6 @@ .text .nocmp .align 2 - .global sub1 .hidden sub1 .type sub1, @function sub1: diff --git a/ld/testsuite/ld-tic6x/shlib-1b.rd b/ld/testsuite/ld-tic6x/shlib-1b.rd index e8181604f27..cf1f34689f1 100644 --- a/ld/testsuite/ld-tic6x/shlib-1b.rd +++ b/ld/testsuite/ld-tic6x/shlib-1b.rd @@ -16,7 +16,7 @@ Section Headers: \[11\] \.neardata PROGBITS 10000128 002128 000008 00 WA 0 0 4 \[12\] \.bss NOBITS 10000130 002130 000004 00 WA 0 0 4 \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00 0 0 1 - \[14\] \.symtab SYMTAB 00000000 00214c 000190 10 15 19 4 + \[14\] \.symtab SYMTAB 00000000 00214c 0001b0 10 15 21 4 \[15\] \.strtab STRTAB .* \[16\] \.shstrtab STRTAB .* Key to Flags: @@ -90,7 +90,7 @@ Symbol table '\.dynsym' contains 12 entries: 10: 10000128 4 OBJECT GLOBAL DEFAULT 11 a 11: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub -Symbol table '\.symtab' contains 25 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008000 0 SECTION LOCAL DEFAULT 1.* @@ -106,14 +106,16 @@ Symbol table '\.symtab' contains 25 entries: 11: 10000128 0 SECTION LOCAL DEFAULT 11.* 12: 10000130 0 SECTION LOCAL DEFAULT 12.* 13: 00000000 0 SECTION LOCAL DEFAULT 13.* - 14: 10000080 0 FUNC LOCAL DEFAULT 9 sub1 - 15: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC - 16: 10000130 4 OBJECT LOCAL DEFAULT 12 c - 17: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ - 18: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE - 19: 00000000 0 NOTYPE WEAK DEFAULT UND b - 20: 00000000 0 NOTYPE WEAK DEFAULT UND g1 - 21: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 - 22: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 - 23: 10000128 4 OBJECT GLOBAL DEFAULT 11 a - 24: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub + 14: 00000000 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 15: 10000080 0 FUNC LOCAL HIDDEN 9 sub1 + 16: 00000000 0 FILE LOCAL DEFAULT ABS + 17: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 18: 10000130 4 OBJECT LOCAL DEFAULT 12 c + 19: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 20: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE + 21: 00000000 0 NOTYPE WEAK DEFAULT UND b + 22: 00000000 0 NOTYPE WEAK DEFAULT UND g1 + 23: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 + 24: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 + 25: 10000128 4 OBJECT GLOBAL DEFAULT 11 a + 26: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub diff --git a/ld/testsuite/ld-tic6x/shlib-1r.dd b/ld/testsuite/ld-tic6x/shlib-1r.dd index 68caa87d14d..b9934b5d27b 100644 --- a/ld/testsuite/ld-tic6x/shlib-1r.dd +++ b/ld/testsuite/ld-tic6x/shlib-1r.dd @@ -42,7 +42,7 @@ Disassembly of section \.text: 10000094:[ \t]*0700026e[ \t]*ldw \.D2T2 \*\+b14\(8\),b14 10000098:[ \t]*0ffffa12[ \t]*b \.S2 10000050 1000009c:[ \t]*0ffff712[ \t]*b \.S2 10000038 -100000a0:[ \t]*0ffff812[ \t]*b \.S2 10000060 +100000a0:[ \t]*0ffffc12[ \t]*b \.S2 10000080 100000a4:[ \t]*01bc62e6[ \t]*ldw \.D2T2 \*\+b15\(12\),b3 100000a8:[ \t]*073c82e6[ \t]*ldw \.D2T2 \*\+b15\(16\),b14 100000ac:[ \t]*07800852[ \t]*addk \.S2 16,b15 diff --git a/ld/testsuite/ld-tic6x/shlib-1r.rd b/ld/testsuite/ld-tic6x/shlib-1r.rd index e8181604f27..cf1f34689f1 100644 --- a/ld/testsuite/ld-tic6x/shlib-1r.rd +++ b/ld/testsuite/ld-tic6x/shlib-1r.rd @@ -16,7 +16,7 @@ Section Headers: \[11\] \.neardata PROGBITS 10000128 002128 000008 00 WA 0 0 4 \[12\] \.bss NOBITS 10000130 002130 000004 00 WA 0 0 4 \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00 0 0 1 - \[14\] \.symtab SYMTAB 00000000 00214c 000190 10 15 19 4 + \[14\] \.symtab SYMTAB 00000000 00214c 0001b0 10 15 21 4 \[15\] \.strtab STRTAB .* \[16\] \.shstrtab STRTAB .* Key to Flags: @@ -90,7 +90,7 @@ Symbol table '\.dynsym' contains 12 entries: 10: 10000128 4 OBJECT GLOBAL DEFAULT 11 a 11: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub -Symbol table '\.symtab' contains 25 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008000 0 SECTION LOCAL DEFAULT 1.* @@ -106,14 +106,16 @@ Symbol table '\.symtab' contains 25 entries: 11: 10000128 0 SECTION LOCAL DEFAULT 11.* 12: 10000130 0 SECTION LOCAL DEFAULT 12.* 13: 00000000 0 SECTION LOCAL DEFAULT 13.* - 14: 10000080 0 FUNC LOCAL DEFAULT 9 sub1 - 15: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC - 16: 10000130 4 OBJECT LOCAL DEFAULT 12 c - 17: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ - 18: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE - 19: 00000000 0 NOTYPE WEAK DEFAULT UND b - 20: 00000000 0 NOTYPE WEAK DEFAULT UND g1 - 21: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 - 22: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 - 23: 10000128 4 OBJECT GLOBAL DEFAULT 11 a - 24: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub + 14: 00000000 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 15: 10000080 0 FUNC LOCAL HIDDEN 9 sub1 + 16: 00000000 0 FILE LOCAL DEFAULT ABS + 17: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 18: 10000130 4 OBJECT LOCAL DEFAULT 12 c + 19: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 20: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE + 21: 00000000 0 NOTYPE WEAK DEFAULT UND b + 22: 00000000 0 NOTYPE WEAK DEFAULT UND g1 + 23: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 + 24: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 + 25: 10000128 4 OBJECT GLOBAL DEFAULT 11 a + 26: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub diff --git a/ld/testsuite/ld-tic6x/shlib-1rb.dd b/ld/testsuite/ld-tic6x/shlib-1rb.dd index c7d55075695..6b3a2c2464b 100644 --- a/ld/testsuite/ld-tic6x/shlib-1rb.dd +++ b/ld/testsuite/ld-tic6x/shlib-1rb.dd @@ -42,7 +42,7 @@ Disassembly of section \.text: 10000094:[ \t]*0700026e[ \t]*ldw \.D2T2 \*\+b14\(8\),b14 10000098:[ \t]*0ffffa12[ \t]*b \.S2 10000050 1000009c:[ \t]*0ffff712[ \t]*b \.S2 10000038 -100000a0:[ \t]*0ffff812[ \t]*b \.S2 10000060 +100000a0:[ \t]*0ffffc12[ \t]*b \.S2 10000080 100000a4:[ \t]*01bc62e6[ \t]*ldw \.D2T2 \*\+b15\(12\),b3 100000a8:[ \t]*073c82e6[ \t]*ldw \.D2T2 \*\+b15\(16\),b14 100000ac:[ \t]*07800852[ \t]*addk \.S2 16,b15 diff --git a/ld/testsuite/ld-tic6x/shlib-1rb.rd b/ld/testsuite/ld-tic6x/shlib-1rb.rd index e8181604f27..cf1f34689f1 100644 --- a/ld/testsuite/ld-tic6x/shlib-1rb.rd +++ b/ld/testsuite/ld-tic6x/shlib-1rb.rd @@ -16,7 +16,7 @@ Section Headers: \[11\] \.neardata PROGBITS 10000128 002128 000008 00 WA 0 0 4 \[12\] \.bss NOBITS 10000130 002130 000004 00 WA 0 0 4 \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00 0 0 1 - \[14\] \.symtab SYMTAB 00000000 00214c 000190 10 15 19 4 + \[14\] \.symtab SYMTAB 00000000 00214c 0001b0 10 15 21 4 \[15\] \.strtab STRTAB .* \[16\] \.shstrtab STRTAB .* Key to Flags: @@ -90,7 +90,7 @@ Symbol table '\.dynsym' contains 12 entries: 10: 10000128 4 OBJECT GLOBAL DEFAULT 11 a 11: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub -Symbol table '\.symtab' contains 25 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008000 0 SECTION LOCAL DEFAULT 1.* @@ -106,14 +106,16 @@ Symbol table '\.symtab' contains 25 entries: 11: 10000128 0 SECTION LOCAL DEFAULT 11.* 12: 10000130 0 SECTION LOCAL DEFAULT 12.* 13: 00000000 0 SECTION LOCAL DEFAULT 13.* - 14: 10000080 0 FUNC LOCAL DEFAULT 9 sub1 - 15: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC - 16: 10000130 4 OBJECT LOCAL DEFAULT 12 c - 17: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ - 18: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE - 19: 00000000 0 NOTYPE WEAK DEFAULT UND b - 20: 00000000 0 NOTYPE WEAK DEFAULT UND g1 - 21: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 - 22: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 - 23: 10000128 4 OBJECT GLOBAL DEFAULT 11 a - 24: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub + 14: 00000000 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 15: 10000080 0 FUNC LOCAL HIDDEN 9 sub1 + 16: 00000000 0 FILE LOCAL DEFAULT ABS + 17: 00008154 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 18: 10000130 4 OBJECT LOCAL DEFAULT 12 c + 19: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 20: 10000100 0 NOTYPE LOCAL DEFAULT 10 __c6xabi_DSBT_BASE + 21: 00000000 0 NOTYPE WEAK DEFAULT UND b + 22: 00000000 0 NOTYPE WEAK DEFAULT UND g1 + 23: 1000012c 4 OBJECT GLOBAL DEFAULT 11 g2 + 24: 10000088 52 FUNC GLOBAL DEFAULT 9 sub0 + 25: 10000128 4 OBJECT GLOBAL DEFAULT 11 a + 26: 100000c0 52 FUNC GLOBAL DEFAULT 9 sub diff --git a/ld/testsuite/ld-tic6x/shlib-noindex.rd b/ld/testsuite/ld-tic6x/shlib-noindex.rd index 76a26bd7847..52e433424f1 100644 --- a/ld/testsuite/ld-tic6x/shlib-noindex.rd +++ b/ld/testsuite/ld-tic6x/shlib-noindex.rd @@ -17,7 +17,7 @@ Section Headers: \[12\] \.neardata PROGBITS 10000128 002128 000008 00 WA 0 0 4 \[13\] \.bss NOBITS 10000130 002130 000004 00 WA 0 0 4 \[14\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00 0 0 1 - \[15\] \.symtab SYMTAB 00000000 00214c 0001a0 10 16 20 4 + \[15\] \.symtab SYMTAB 00000000 00214c 0001c0 10 16 22 4 \[16\] \.strtab STRTAB .* \[17\] \.shstrtab STRTAB .* Key to Flags: @@ -96,7 +96,7 @@ Symbol table '\.dynsym' contains 12 entries: 10: 10000128 4 OBJECT GLOBAL DEFAULT 12 a 11: 100000c0 52 FUNC GLOBAL DEFAULT 10 sub -Symbol table '\.symtab' contains 26 entries: +Symbol table '\.symtab' contains 28 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008000 0 SECTION LOCAL DEFAULT 1.* @@ -113,14 +113,16 @@ Symbol table '\.symtab' contains 26 entries: 12: 10000128 0 SECTION LOCAL DEFAULT 12.* 13: 10000130 0 SECTION LOCAL DEFAULT 13.* 14: 00000000 0 SECTION LOCAL DEFAULT 14.* - 15: 10000080 0 FUNC LOCAL DEFAULT 10 sub1 - 16: 00008160 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC - 17: 10000130 4 OBJECT LOCAL DEFAULT 13 c - 18: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ - 19: 10000100 0 NOTYPE LOCAL DEFAULT 11 __c6xabi_DSBT_BASE - 20: 00000000 0 NOTYPE WEAK DEFAULT UND b - 21: 00000000 0 NOTYPE WEAK DEFAULT UND g1 - 22: 1000012c 4 OBJECT GLOBAL DEFAULT 12 g2 - 23: 10000088 52 FUNC GLOBAL DEFAULT 10 sub0 - 24: 10000128 4 OBJECT GLOBAL DEFAULT 12 a - 25: 100000c0 52 FUNC GLOBAL DEFAULT 10 sub + 15: 00000000 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 16: 10000080 0 FUNC LOCAL HIDDEN 10 sub1 + 17: 00000000 0 FILE LOCAL DEFAULT ABS + 18: 00008160 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 19: 10000130 4 OBJECT LOCAL DEFAULT 13 c + 20: 1000010c 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 21: 10000100 0 NOTYPE LOCAL DEFAULT 11 __c6xabi_DSBT_BASE + 22: 00000000 0 NOTYPE WEAK DEFAULT UND b + 23: 00000000 0 NOTYPE WEAK DEFAULT UND g1 + 24: 1000012c 4 OBJECT GLOBAL DEFAULT 12 g2 + 25: 10000088 52 FUNC GLOBAL DEFAULT 10 sub0 + 26: 10000128 4 OBJECT GLOBAL DEFAULT 12 a + 27: 100000c0 52 FUNC GLOBAL DEFAULT 10 sub diff --git a/ld/testsuite/ld-tic6x/static-app-1.rd b/ld/testsuite/ld-tic6x/static-app-1.rd index fbf453a09b1..cbb887c8114 100644 --- a/ld/testsuite/ld-tic6x/static-app-1.rd +++ b/ld/testsuite/ld-tic6x/static-app-1.rd @@ -14,7 +14,7 @@ Section Headers: \[ 9\] \.neardata PROGBITS [0-9a-f]* [0-9a-f]* 000014 00 WA 0 0 4 \[10\] \.bss NOBITS [0-9a-f]* [0-9a-f]* 000004 00 WA 0 0 4 \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 [0-9a-f]* 000019 00 0 0 1 - \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001b0 10 13 20 4 + \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001c0 10 13 22 4 \[13\] \.strtab STRTAB .* \[14\] \.shstrtab STRTAB .* Key to Flags: @@ -78,7 +78,7 @@ Symbol table '\.dynsym' contains 8 entries: 6: 00000000 0 NOTYPE WEAK DEFAULT UND g1 7: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a -Symbol table '\.symtab' contains 27 entries: +Symbol table '\.symtab' contains 28 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: [0-9a-f]* 0 SECTION LOCAL DEFAULT 1.* @@ -92,18 +92,19 @@ Symbol table '\.symtab' contains 27 entries: 9: [0-9a-f]* 0 SECTION LOCAL DEFAULT 9.* 10: [0-9a-f]* 0 SECTION LOCAL DEFAULT 10.* 11: [0-9a-f]* 0 SECTION LOCAL DEFAULT 11.* - 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1\.o - 13: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish - 14: [0-9a-f]* 8 OBJECT LOCAL DEFAULT 9 w - 15: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS ? - 16: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC - 17: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c - 18: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ - 19: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE - 20: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b - 21: [0-9a-f]* 0 FUNC GLOBAL HIDDEN 7 sub1 - 22: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 - 23: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 - 24: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 - 25: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a - 26: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub + 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 13: [0-9a-f]* 0 FUNC LOCAL HIDDEN 7 sub1 + 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1\.o + 15: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish + 16: [0-9a-f]* 8 OBJECT LOCAL DEFAULT 9 w + 17: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS + 18: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC + 19: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c + 20: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ + 21: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE + 22: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b + 23: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 + 24: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 + 25: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 + 26: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a + 27: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub diff --git a/ld/testsuite/ld-tic6x/static-app-1b.rd b/ld/testsuite/ld-tic6x/static-app-1b.rd index fbf453a09b1..cbb887c8114 100644 --- a/ld/testsuite/ld-tic6x/static-app-1b.rd +++ b/ld/testsuite/ld-tic6x/static-app-1b.rd @@ -14,7 +14,7 @@ Section Headers: \[ 9\] \.neardata PROGBITS [0-9a-f]* [0-9a-f]* 000014 00 WA 0 0 4 \[10\] \.bss NOBITS [0-9a-f]* [0-9a-f]* 000004 00 WA 0 0 4 \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 [0-9a-f]* 000019 00 0 0 1 - \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001b0 10 13 20 4 + \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001c0 10 13 22 4 \[13\] \.strtab STRTAB .* \[14\] \.shstrtab STRTAB .* Key to Flags: @@ -78,7 +78,7 @@ Symbol table '\.dynsym' contains 8 entries: 6: 00000000 0 NOTYPE WEAK DEFAULT UND g1 7: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a -Symbol table '\.symtab' contains 27 entries: +Symbol table '\.symtab' contains 28 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: [0-9a-f]* 0 SECTION LOCAL DEFAULT 1.* @@ -92,18 +92,19 @@ Symbol table '\.symtab' contains 27 entries: 9: [0-9a-f]* 0 SECTION LOCAL DEFAULT 9.* 10: [0-9a-f]* 0 SECTION LOCAL DEFAULT 10.* 11: [0-9a-f]* 0 SECTION LOCAL DEFAULT 11.* - 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1\.o - 13: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish - 14: [0-9a-f]* 8 OBJECT LOCAL DEFAULT 9 w - 15: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS ? - 16: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC - 17: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c - 18: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ - 19: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE - 20: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b - 21: [0-9a-f]* 0 FUNC GLOBAL HIDDEN 7 sub1 - 22: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 - 23: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 - 24: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 - 25: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a - 26: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub + 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 13: [0-9a-f]* 0 FUNC LOCAL HIDDEN 7 sub1 + 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1\.o + 15: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish + 16: [0-9a-f]* 8 OBJECT LOCAL DEFAULT 9 w + 17: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS + 18: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC + 19: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c + 20: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ + 21: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE + 22: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b + 23: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 + 24: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 + 25: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 + 26: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a + 27: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub diff --git a/ld/testsuite/ld-tic6x/static-app-1r.dd b/ld/testsuite/ld-tic6x/static-app-1r.dd index f494d91faab..82b3ecd13c3 100644 --- a/ld/testsuite/ld-tic6x/static-app-1r.dd +++ b/ld/testsuite/ld-tic6x/static-app-1r.dd @@ -15,7 +15,7 @@ Disassembly of section \.text: 10000014:[ \t]*0700006e[ \t]*ldw \.D2T2 \*\+b14\(0\),b14 10000018:[ \t]*00000812[ \t]*b \.S2 10000040 1000001c:[ \t]*00000112[ \t]*b \.S2 10000008 -10000020:[ \t]*0ffff812[ \t]*b \.S2 [0-9a-f]+ <_DYNAMIC\+0x[0-9a-f]+> +10000020:[ \t]*0ffffc12[ \t]*b \.S2 10000000 10000024:[ \t]*01bc62e6[ \t]*ldw \.D2T2 \*\+b15\(12\),b3 10000028:[ \t]*073c82e6[ \t]*ldw \.D2T2 \*\+b15\(16\),b14 1000002c:[ \t]*07800852[ \t]*addk \.S2 16,b15 diff --git a/ld/testsuite/ld-tic6x/static-app-1r.rd b/ld/testsuite/ld-tic6x/static-app-1r.rd index 9c71915871a..9b6d21169d1 100644 --- a/ld/testsuite/ld-tic6x/static-app-1r.rd +++ b/ld/testsuite/ld-tic6x/static-app-1r.rd @@ -14,7 +14,7 @@ Section Headers: \[ 9\] \.neardata PROGBITS [0-9a-f]* [0-9a-f]* 00000c 00 WA 0 0 4 \[10\] \.bss NOBITS [0-9a-f]* [0-9a-f]* 000004 00 WA 0 0 4 \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 [0-9a-f]* 000019 00 0 0 1 - \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001a0 10 13 19 4 + \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001b0 10 13 21 4 \[13\] \.strtab STRTAB .* \[14\] \.shstrtab STRTAB .* Key to Flags: @@ -76,7 +76,7 @@ Symbol table '\.dynsym' contains 8 entries: 6: 00000000 0 NOTYPE WEAK DEFAULT UND g1 7: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a -Symbol table '\.symtab' contains 26 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: [0-9a-f]* 0 SECTION LOCAL DEFAULT 1.* @@ -90,17 +90,18 @@ Symbol table '\.symtab' contains 26 entries: 9: [0-9a-f]* 0 SECTION LOCAL DEFAULT 9.* 10: [0-9a-f]* 0 SECTION LOCAL DEFAULT 10.* 11: [0-9a-f]* 0 SECTION LOCAL DEFAULT 11.* - 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1r\.o - 13: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish - 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS ? - 15: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC - 16: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c - 17: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ - 18: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE - 19: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b - 20: [0-9a-f]* 0 FUNC GLOBAL HIDDEN 7 sub1 - 21: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 - 22: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 - 23: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 - 24: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a - 25: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub + 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 13: [0-9a-f]* 0 FUNC LOCAL HIDDEN 7 sub1 + 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1r\.o + 15: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish + 16: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS + 17: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC + 18: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c + 19: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ + 20: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE + 21: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b + 22: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 + 23: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 + 24: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 + 25: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a + 26: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub diff --git a/ld/testsuite/ld-tic6x/static-app-1rb.dd b/ld/testsuite/ld-tic6x/static-app-1rb.dd index 901a62d1ad8..9e211ca489b 100644 --- a/ld/testsuite/ld-tic6x/static-app-1rb.dd +++ b/ld/testsuite/ld-tic6x/static-app-1rb.dd @@ -15,7 +15,7 @@ Disassembly of section \.text: 10000014:[ \t]*0700006e[ \t]*ldw \.D2T2 \*\+b14\(0\),b14 10000018:[ \t]*00000812[ \t]*b \.S2 10000040 1000001c:[ \t]*00000112[ \t]*b \.S2 10000008 -10000020:[ \t]*0ffff812[ \t]*b \.S2 [0-9a-f]+ <_DYNAMIC\+0x[0-9a-f]+> +10000020:[ \t]*0ffffc12[ \t]*b \.S2 10000000 10000024:[ \t]*01bc62e6[ \t]*ldw \.D2T2 \*\+b15\(12\),b3 10000028:[ \t]*073c82e6[ \t]*ldw \.D2T2 \*\+b15\(16\),b14 1000002c:[ \t]*07800852[ \t]*addk \.S2 16,b15 diff --git a/ld/testsuite/ld-tic6x/static-app-1rb.rd b/ld/testsuite/ld-tic6x/static-app-1rb.rd index 9c71915871a..9b6d21169d1 100644 --- a/ld/testsuite/ld-tic6x/static-app-1rb.rd +++ b/ld/testsuite/ld-tic6x/static-app-1rb.rd @@ -14,7 +14,7 @@ Section Headers: \[ 9\] \.neardata PROGBITS [0-9a-f]* [0-9a-f]* 00000c 00 WA 0 0 4 \[10\] \.bss NOBITS [0-9a-f]* [0-9a-f]* 000004 00 WA 0 0 4 \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 [0-9a-f]* 000019 00 0 0 1 - \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001a0 10 13 19 4 + \[12\] \.symtab SYMTAB 00000000 [0-9a-f]* 0001b0 10 13 21 4 \[13\] \.strtab STRTAB .* \[14\] \.shstrtab STRTAB .* Key to Flags: @@ -76,7 +76,7 @@ Symbol table '\.dynsym' contains 8 entries: 6: 00000000 0 NOTYPE WEAK DEFAULT UND g1 7: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a -Symbol table '\.symtab' contains 26 entries: +Symbol table '\.symtab' contains 27 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: [0-9a-f]* 0 SECTION LOCAL DEFAULT 1.* @@ -90,17 +90,18 @@ Symbol table '\.symtab' contains 26 entries: 9: [0-9a-f]* 0 SECTION LOCAL DEFAULT 9.* 10: [0-9a-f]* 0 SECTION LOCAL DEFAULT 10.* 11: [0-9a-f]* 0 SECTION LOCAL DEFAULT 11.* - 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1r\.o - 13: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish - 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS ? - 15: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC - 16: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c - 17: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ - 18: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE - 19: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b - 20: [0-9a-f]* 0 FUNC GLOBAL HIDDEN 7 sub1 - 21: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 - 22: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 - 23: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 - 24: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a - 25: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub + 12: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-1\.o + 13: [0-9a-f]* 0 FUNC LOCAL HIDDEN 7 sub1 + 14: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS .*shlib-app-1r\.o + 15: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 7 fish + 16: [0-9a-f]* 0 FILE LOCAL DEFAULT ABS + 17: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 6 _DYNAMIC + 18: [0-9a-f]* 4 OBJECT LOCAL DEFAULT 10 c + 19: [0-9a-f]* 0 OBJECT LOCAL DEFAULT 8 _GLOBAL_OFFSET_TABLE_ + 20: [0-9a-f]* 0 NOTYPE LOCAL DEFAULT 8 __c6xabi_DSBT_BASE + 21: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 b + 22: [0-9a-f]* 0 NOTYPE WEAK DEFAULT UND g1 + 23: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 g2 + 24: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub0 + 25: [0-9a-f]* 4 OBJECT GLOBAL DEFAULT 9 a + 26: [0-9a-f]* 52 FUNC GLOBAL DEFAULT 7 sub -- 2.54.0