Page MenuHomeFreeBSD

amd64: do not pass -z rodynamic to ld.bfd when building vdso
ClosedPublic

Authored by kib on Oct 18 2024, 2:21 PM.
Tags
None
Referenced Files
F144347331: D47176.diff
Sat, Feb 7, 11:33 PM
Unknown Object (File)
Thu, Feb 5, 2:10 PM
Unknown Object (File)
Fri, Jan 23, 5:25 PM
Unknown Object (File)
Sat, Jan 17, 2:06 PM
Unknown Object (File)
Wed, Jan 14, 6:55 PM
Unknown Object (File)
Jan 8 2026, 5:04 PM
Unknown Object (File)
Dec 14 2025, 11:24 AM
Unknown Object (File)
Nov 15 2025, 10:23 PM
Subscribers

Details

Summary

Apparently newer versions of binutils complain instead of silently ignoring the unknown -z option.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 18 2024, 2:21 PM

Not sure how to make kernel old way (config && make) with cross-toolchain.

Also, what is the idiomatic way to distinguish ld.bfd from ld.lld?

For Makefiles we have bsd.linker.mk that sets LINKER_TYPE, with a similar sort of approach to what you've done here. It uses sed to extract the first line of output from ld -v and then various bits of make magic to examine parts of that.

In ports we check ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld to determine if lld is the default linker (from when it was only so on some archs).

For Makefiles we have bsd.linker.mk that sets LINKER_TYPE, with a similar sort of approach to what you've done here. It uses sed to extract the first line of output from ld -v and then various bits of make magic to examine parts of that.

So I am leaving the check as is. IMO it is not worth additional complications to add sed there.

In ports we check ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld to determine if lld is the default linker (from when it was only so on some archs).

One minor comment update

sys/tools/amd64_vdso.sh
43
This revision is now accepted and ready to land.Oct 18 2024, 5:16 PM
This revision was automatically updated to reflect the committed changes.
kib marked an inline comment as done.