[klibc] [PATCH klibc 3/3] riscv64: Move shared library below executables
ben at decadent.org.uk
Sun Jul 16 15:31:58 PDT 2023
On Sun, 2023-07-16 at 20:20 +0000, Thorsten Glaser wrote:
> Ben Hutchings dixit:
> > Move the shared library to 64 kiB and executables to 576 kiB, to allow
> > for generation of single-instruction jumps.
> Does this DTRT for binaries that are large enough to need
> two-instruction jumps in their upper part?
The compiler generates two-instruction jumps, but it gives the linker
enough information to "relax" those to one instruction where possible.
> > (klibc.so is currently
> > much smaller than the 512 kiB this allows for.)
> Since the .so is not a stable ABI, could even size that
> to fit.
That seems like it would rather harder to do correctly...
> (That being said, klibc-using binaries tend to be small
> enough that it doesn’t matter; even mksh only comes in
> at around 180k statically(!) linked, on amd64.)
> Otherwise, lgtm, but again with two nōn-UTF-8 chars.
Theory and practice are closer in theory than in practice - John Levine
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the klibc