[PATCH] ld: depend on libctf

Stephen Casner casner@acm.org
Wed Jan 27 02:47:23 GMT 2021


It seems I am stuck, so if any of you have advice I would appreciate
it.

Switching to gcc10 did not help because the problem is ld.  I have the
MacPorts binutils package installed (2.34 is latest), but I see that
does not include ld.  The ld that I have is:

auge57> ld -v
@(#)PROGRAM:ld  PROJECT:ld64-530
BUILD 18:57:17 Dec 13 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 11.0.0, (clang-1100.0.33.17) (static support for 23, runtime is 23)
TAPI support using: Apple TAPI version 11.0.0 (tapi-1100.0.11)

I have the binutils sources, of course, in order to build the pdp11
cross, but I can't build the native ld, either.  Is a binary for macOS
10.14 available somewhere?

                                                        -- Steve

On Tue, 26 Jan 2021, Stephen Casner wrote:

> Looking more closely at the error message I just mentioned...
>
> > ld: warning: ignoring file ../libctf/.libs/libctf.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
>
> That doesn't make any sense because macOS-x86_64 = macOS-x86_64.  Does
> building with clang no longer work?  Since the library file was
> ignored, it's no surprise that there were symbols not found.
>
>                                                         -- Steve
>
> > 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
> >   "_ctf_close", referenced from:
> >       _dump_bfd in objdump.o
> >   "_ctf_dict_close", referenced from:
> >       _dump_bfd in objdump.o
> >   "_ctf_dict_open", referenced from:
> >       _dump_bfd in objdump.o
> >   "_ctf_dump", referenced from:
> >       _dump_ctf_archive_member in objdump.o
> >   "_ctf_errmsg", referenced from:
> >       _dump_bfd in objdump.o
> >       _dump_ctf_errs in objdump.o
> >       _dump_ctf_archive_member in objdump.o
> >   "_ctf_errno", referenced from:
> >       _dump_ctf_archive_member in objdump.o
> >   "_ctf_errwarning_next", referenced from:
> >       _dump_ctf_errs in objdump.o
> >   "_ctf_import", referenced from:
> >       _dump_ctf_archive_member in objdump.o
> > ld: symbol(s) not found for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see invocation)


More information about the Binutils mailing list