[PATCH] ld: depend on libctf

Stephen Casner casner@acm.org
Tue Jan 26 23:08:44 GMT 2021


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