If you really want to do this, maybe you're now ready for that linker scripts rabbit hole (as mentioned in the last paragraph of
msg #2).
To avoid the need for a dynamic loading process that re-writes all the absolute addresses, you'll probably want to edit
Teensy 4.1's linker script. Or maybe you could just reuse the existing hab_log section from
line 70. The idea is to create a big memory buffer that will always be located at a fixed known location in memory. Today the only thing that uses hab_log is the LockSecureMode sketch. To see it, you need Arduino 1.8.x (not yet available on Arduino 2.0.x due to
issue #58) and click
Tools > Teensy 4 Security. The last button in the Teensy 4 Security opens the LockSecureMode sketch. Look for the comment "do not delete this line", though that probably won't be an issue once your program has code which reads bytes from the SD card and puts them into your known-location buffer.
Then of course you'll also need to create a linker script for compiling programs which use that buffer. Presumably you'll dedicate part of the buffer for code, part for static/global variables, and part for the stack. Or maybe your programs will just use the existing stack? Presumably you'll create a special section similar to "ivt" that tells your program where the loaded code's entry point is? Or maybe you'll have a special section at the beginning and just 1 function in compiled program which uses it, so you can just jump to the beginning? So many choices...
Anyway, it is theoretically possible to craft linker scripts that give you known fixed addresses. This questions has come up a number of times and so far (as far as I know) nobody has actually put in the effort and shared any working results. If you do, I hope you'll share it?