https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279122
Bug ID: 279122
Summary: /boot/kernel/kernel: "not stripped"
Product: Base System
Version: 14.0-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: b...@freebsd.org
Reporter: egyp...@freebsd.org
I'm running stripped 'kernel' for quite a few years without ANY sort of issue.
I use them on physical and virtual machines - also, on "normal" deployments of
FreeBSD or serving mfs images (compressed, or not).
So, is there a very good reason why we (officially) do not strip the FreeBSD
kernel? - at least on STABLE or RELEASE versions.
Once I am pretty much far from being an expert on that level, I would love to
get more input about it from anyone that would be keen to explain that to me
(and others here). - shall this kind of topic be added to our Handbook (or
developers documentation) as well?
>From a FreeBSD live system, here we have some fair outputs of what is meant by
this PR:
root@:~ # mkdir /tmp/base
root@:~ # mount /dev/gpt/base0 /tmp/base/
root@:~ # tar xf /usr/freebsd-dist/base.txz -C /tmp/ usr/bin/strip
root@:~ # cp -a /boot/kernel/kernel /tmp/base/kernel
root@:~ # /tmp/usr/bin/strip /tmp/base/kernel
*** 14.0-RELEASE
root@:~ # uname -abiUK
FreeBSD 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4:
Fri Nov 10 05:57:23 UTC 2023
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
GENERIC 1400097 1400097 de04db27d4d136c96cba9e384c8bc9e7b337a2c5
root@:~ # file /boot/kernel/kernel /tmp/base/kernel
/boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=de04db27d4d136c96cba9e384c8bc9e7b337a2c5, not stripped
/tmp/base/kernel:ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=de04db27d4d136c96cba9e384c8bc9e7b337a2c5, stripped
root@:~ # ls -lais /boot/kernel/kernel /tmp/base/kernel
10156980 26371 -r-xr-xr-x 1 root wheel 27003712 Nov 10 2023
/boot/kernel/kernel
6 23144 -r-xr-xr-x 1 root wheel 23643432 May 18 08:07 /tmp/base/kernel
*** 14.1-STABLE
root@:~ # uname -abiUK
FreeBSD 14.1-STABLE FreeBSD 14.1-STABLE stable/14-n267634-7b65987885da GENERIC
amd64 GENERIC 1401500 1401500 03870066df47c918b5678f89b12252aae1c3e94f
root@:~ # file /boot/kernel/kernel /tmp/base/kernel
/boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=03870066df47c918b5678f89b12252aae1c3e94f, not stripped
/tmp/base/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=03870066df47c918b5678f89b12252aae1c3e94f, stripped
root@:~ # ls -laish /boot/kernel/kernel /tmp/base/kernel
10163936 28434 -r--r--r-- 1 root wheel 28M May 9 06:11 /boot/kernel/kernel
7 25200 -r--r--r-- 1 root wheel 25M May 18 07:49 /tmp/base/kernel
--
You are receiving this mail because:
You are the assignee for the bug.