Page MenuHomeFreeBSD

loader: i386: use -z nostart-stop-gc for bfd as well
ClosedPublic

Authored by kevans on May 8 2025, 4:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 10, 12:31 PM
Unknown Object (File)
Thu, Jul 10, 5:02 AM
Unknown Object (File)
Wed, Jul 9, 1:04 PM
Unknown Object (File)
Wed, Jul 9, 8:26 AM
Unknown Object (File)
Wed, Jul 9, 3:35 AM
Unknown Object (File)
Tue, Jul 8, 11:29 PM
Unknown Object (File)
Tue, Jul 8, 11:09 AM
Unknown Object (File)
Tue, Jul 8, 1:20 AM

Details

Summary

binutils 2.37 seems to have added the knob, so let's just use that
version here (it's not clear if GC'ing start/stop symbols was actually
made the default at the time, and it didn't seem worth it to dig much
further). This fixes misbehavior when built with more recent binutils,
as we do rely on linker sets for loader commands that we use.

Reported by: sjg

Diff Detail

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

Event Timeline

kevans requested review of this revision.May 8 2025, 4:20 AM
sjg added a subscriber: sjg.

Looks good

This revision is now accepted and ready to land.May 8 2025, 4:31 AM
emaste added inline comments.
stand/i386/loader/Makefile
95

and bfd ld 2.37 and higher

Hm, binutils should still be defaulting to -znostart-stop-gc even today in their master branch. So this really should be a no-op, this shouldn't be the cause of any issues. (Unless sjg is building with some modified environment that overrides that default, I suppose, but that's shooting oneself in the foot...)