Re:Understanding the x64 code models (2012)
by layer8 on Tuesday July 19, 2022 @04:40PM
(#32157664)
The article doesn’t address what happens if you pick the wrong (too small) model. I guess the static linker will catch certain cases, and the dynamic linker/loader will catch certain other cases, but will all cases be caught by one of those two, or can the compiled instructions end up being executed, leading to incorrect memory accesses?
[ Parent
| on HN ]
Re:Understanding the x64 code models (2012)
by duskwuff on Tuesday July 19, 2022 @05:55PM
(#32158487)
> The article doesn’t address what happens if you pick the wrong (too small) model.
The (static) linker will realize that an address won't fit, or that it can't generate a required relocation, and will fail to generate an executable.
I wonder what busybox_x86-64 does.
https://busybox.net/downloads/binaries/1.35.0-i686-linux-mus...