Page MenuHomeFreeBSD

kernel: whack objcopy --strip-symbol gcc2_compiled
ClosedPublic

Authored by mjg on Feb 24 2023, 7:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 8, 12:33 PM
Unknown Object (File)
May 15 2024, 5:25 AM
Unknown Object (File)
May 5 2024, 3:45 PM
Unknown Object (File)
Feb 15 2024, 6:07 AM
Unknown Object (File)
Jan 14 2024, 4:15 AM
Unknown Object (File)
Dec 24 2023, 7:38 AM
Unknown Object (File)
Oct 31 2023, 3:29 PM
Unknown Object (File)
Sep 25 2023, 6:42 PM
Subscribers

Details

Summary

Looks like a noop.

I don't see the symbol without stripping. Found with execsnoop.

Diff Detail

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

Event Timeline

mjg requested review of this revision.Feb 24 2023, 7:57 PM

This practice dates back a long way, with only small tweaks since Bruce's original commit:

commit b5d89ca8ade3a416cb6e760fbfc742de9878fd7b
Author: Bruce Evans <bde@FreeBSD.org>
Date:   Wed Jan 25 21:40:47 1995 +0000

    Load the kernel symbol table in the boot loader and not at compile time.
...
    Makefile.i386:
    Nuke use of dbsym.
    Exclude gcc symbols from kernel unless compiling with -g.
    Remove unused macro.
    Fix comments and formatting.
...

and seems to have been done to reduce the size of the kernel and the number of symbols we'd need to load in the boot loader.
I kinda suspect that it's no longer relevant since we only have a few modules in the tree with these symbols (they are binaries
for old hardware), and even when compiled with gcc12, I can find no gcc2 symbols of any kind, though admittedly I didn't do
a complete audit.

If you are open to it, I'd suggest the following commit message, but this is a good change regardless of commit message.

kernel: Stop filtering gcc2_compiled symbols

We've not needed to filter these for a long time. No modern compiler generates them.
sys/conf/kern.pre.mk
342

You've removed the @ at the start of this, which will make things more chatty. Was that intentional?

This revision is now accepted and ready to land.Feb 25 2023, 4:11 PM

feel free to commit yourself, i don't need to be mentioned, just want this gone

to that end also comandeer and/or close the revision

In D38764#882510, @mjg wrote:

feel free to commit yourself, i don't need to be mentioned, just want this gone

to that end also comandeer and/or close the revision

Sure thing. It looks like it was an a.out thing, but I'm still checking...

This revision was automatically updated to reflect the committed changes.