freebsd-nq/stand
Kyle Evans 2583c3374d loader: fix userboot's ability to detect a guest's interpreter
Some time after r338418, I believe with -Os/-Oz -ffunction-sections
-fdata-sections, the bootprog_interp variable that held our "$Interpreter:"
marker started getting strip from all loaders, with exception to userboot
since it used bootprog_interp to determine what flavor of userboot it was.

At some point, it had been brought to my attention that this was no longer
working and I had worked up some potential solutions to use the variable
that involved printing it out. My vague recollection is that this was
rejected, and I forgot to explore the alternatives; I cannot find records of
this discussion anymore.

Fast forward to present day, Andrew reported that it was non-functional and
offered (effectively) this patch (sans comment) to stop the compiler from
optimizing it out by assigning it to a volatile variable. This removes
concerns about user-facing change while retaining the interpreter marker.
Furthermore, it could certainly be uglier.

Reported and tested by:	Andrew Gierth <andrew_tao173.riddles.org.uk>
MFC after:	3 days
2020-05-20 21:02:08 +00:00
..
arm Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
arm64 No need to make objects here. 2018-04-27 22:15:18 +00:00
common loader: fix userboot's ability to detect a guest's interpreter 2020-05-20 21:02:08 +00:00
defaults loader.conf(5): document that loader_conf_files may be clobbered 2020-04-30 02:50:58 +00:00
efi Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
fdt stand/fdt: Scale blob size better as overlays apply 2020-01-09 04:34:42 +00:00
ficl veloader use vectx API for kernel and modules 2020-03-09 16:02:54 +00:00
ficl32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
forth loader: Fully reset terminal settings, not just colors 2020-03-27 17:37:31 +00:00
i386 Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
kshim A more definitions to kernel emulation shim in order to build stand/usb. 2018-02-07 18:50:36 +00:00
liblua veloader use vectx API for kernel and modules 2020-03-09 15:48:53 +00:00
liblua32 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
libofw Redo r360540 to retain the ifndef sparc code, not delete it. 2020-05-01 18:36:48 +00:00
libsa Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
libsa32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
lua lualoader: config: improve readConfFiles, rename to readConf 2020-04-30 21:04:39 +00:00
man Remove sparc64 support from the boot loader. 2020-02-03 17:34:57 +00:00
mips stand: -fno-common fixes for !x86 loaders 2020-04-07 12:57:50 +00:00
powerpc [PowerPC] Set fixed boot1.elf load address 2020-05-01 16:56:36 +00:00
uboot stand: -fno-common fixes for !x86 loaders 2020-04-07 12:57:50 +00:00
usb Fix build of stand/usb . 2020-01-23 10:40:34 +00:00
userboot Stop setting PG_U in bootstrap mappings. 2020-04-24 13:53:40 +00:00
defs.mk Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
fdt.mk
ficl.mk ficl pfopen: verify file 2019-05-24 19:43:38 +00:00
loader.mk loader: remove libsa/crc32.c and use version from zlib 2020-03-19 21:05:11 +00:00
lua.mk Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
Makefile Move stand/ofw/libofw to stand/libofw. 2020-01-02 04:34:22 +00:00
Makefile.amd64 Create LOADER_UBOOT, and LOADER_OFW. Move these options out of 2018-03-01 19:50:55 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
uboot.mk Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00