public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: binutils@sourceware.org
Subject: Re: [PATCH] bfin: Check bfd_link_hash_indirect
Date: Tue, 12 Jan 2021 01:49:03 -0500	[thread overview]
Message-ID: <20210112064903.GX7494@vapier> (raw)
In-Reply-To: <20210106232113.GF7494@vapier>

[-- Attachment #1: Type: text/plain, Size: 2720 bytes --]

On 06 Jan 2021 18:21, Mike Frysinger via Binutils wrote:
> On 06 Jan 2021 05:24, H.J. Lu via Binutils wrote:
> > On Wed, Jan 6, 2021 at 4:16 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > On Wed, Jan 6, 2021 at 2:04 AM Mike Frysinger <vapier@gentoo.org> wrote:
> > > > On 29 Dec 2020 10:45, H.J. Lu via Binutils wrote:
> > > > > bfinfdpic_check_relocs shouldn't call bfd_elf_link_record_dynamic_symbol
> > > > > since it has been called from elf_link_add_object_symbols.  This fixed:
> > > > >
> > > > > FAIL: ld-elf/pr26979a
> > > > > FAIL: ld-elf/pr26979b
> > > > > FAIL: Symbol export class test (final shared object)
> > > >
> > > > seems to break FDPIC toolchains:
> > > > $ cat test.c
> > > > static int i = 3;
> > > > int main(int argc, char *argv[]) {
> > > >         return argc + i;
> > > > }
> > > >
> > > > $ bfin-linux-uclibc-gcc test.c
> > > > $ file a.out
> > > > a.out: ELF 32-bit LSB executable, Analog Devices Blackfin, version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, with debug_info, not stripped
> > > >
> > > > commit 865288236d881acecdcf0aaa636fd28fd811d862:
> > > > $ ln -s ld-new ld/ld
> > > > $ bfin-linux-uclibc-gcc -Bld test.c
> > > > <works>
> > > >
> > > > with your patch:
> > > > $ ln -s ld-new ld/ld
> > > > $ bfin-linux-uclibc-gcc -Bld test.c
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2032
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2032
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2032
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2023
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2023
> > > > ld/ld: BFD (GNU Binutils) 2.35.50.20210106 assertion fail ../../../bfd/elf32-bfin.c:2023
> > > > ld/ld: LINKER BUG: .rofixup section size mismatch
> > >
> > > There is no testcase coverage for this case.
> > 
> > There are no bfin specific linker tests at all.
> 
> i'd believe it

hmm i just noticed in one of my local branches:
2010-12-09 12:06:51 -0500 ld: tests: more cross-testing
2010-12-09 12:06:34 -0500 ld: tests: add -msim when testing bfin targets

they're full of tweaks related to enabling testing of targets even when
they aren't native.  so i guess that explains a bit why we didn't have
great linker coverage for so long ... so many of the .exp files were
sprinkled with checks like:
	if ![isnative] then {return}

and we gave up a bit in hopelessness :).  i'll see if i can't dust some
of these off a bit as i think the ld tree has improved since.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-01-12  6:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 18:45 [PATCH] bfin: Don't call bfd_elf_link_record_dynamic_symbol H.J. Lu
2021-01-06  0:15 ` H.J. Lu
2021-01-06  5:44   ` Alan Modra
2021-01-08 11:27   ` Nick Clifton
2021-01-09 14:22     ` H.J. Lu
2021-01-06 10:04 ` Mike Frysinger
2021-01-06 12:16   ` H.J. Lu
2021-01-06 13:24     ` [PATCH] bfin: Check bfd_link_hash_indirect H.J. Lu
2021-01-06 23:21       ` Mike Frysinger
2021-01-12  6:49         ` Mike Frysinger [this message]
2021-01-06 23:36       ` Alan Modra
2021-01-06 23:57         ` Mike Frysinger
2021-01-07  0:37           ` H.J. Lu
2021-01-07  0:55             ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112064903.GX7494@vapier \
    --to=vapier@gentoo.org \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).