[PATCH] ld: depend on libctf

Nick Alcock nick.alcock@oracle.com
Wed Jan 27 13:09:50 GMT 2021


On 26 Jan 2021, Stephen Casner said:
> /Users/casner/src/gnu/binutils/configure --target=pdp11-aout --prefix=/usr/local
>
>                                                         -- Steve
>
> ld: warning: ignoring file ../libctf/.libs/libctf.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64

I think this is your problem, whatever is causing it:

> Undefined symbols for architecture x86_64:
>   "_ctf_archive_iter", referenced from:
>       _dump_bfd in objdump.o
>   "_ctf_bfdopen_ctfsect", referenced from:
>       _dump_bfd in objdump.o

... these symbols all exist, and are in the ignored libctf.a.

Is it seriously warning it's building for arch X but attempting to link
with file built for, uh, the same arch X?

I've never seen this bug and since I don't own anything running MacOS,
and as far as I'm aware there is no way to run a MacOS system under
emulation legally, I'm not sure how I can help here other than to
vaguely point in directions you've already figured out.

I di a test build using clang+lld instead of the GNU toolchain, but
that's not it. Something else is wrong. (That test build did show up a
genuine bug, so it was a good use of time. Not one important enough to
fix on the release branch.)


More information about the Binutils mailing list