Thorsten Glaser
2023-Jul-16 20:20 UTC
[klibc] [PATCH klibc 3/3] riscv64: Move shared library below executables
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?>(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 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. Thanks, //mirabilos -- 15:41?<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)
Ben Hutchings
2023-Jul-16 22:31 UTC
[klibc] [PATCH klibc 3/3] riscv64: Move shared library below executables
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.Thanks. Ben. -- Ben Hutchings Theory and practice are closer in theory than in practice - John Levine -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: <https://lists.zytor.com/archives/klibc/attachments/20230717/e607bcd8/attachment.sig>