LibC: Remove text relocation

Tweak the PLT trampoline to avoid generating textrels in LibC.
This allows us to share all the LibC mappings, reducing per-process
memory consumption by ~200 KB. :^)

Patch originally by @nico.
This commit is contained in:
Andreas Kling 2021-02-19 08:58:17 +01:00
parent 713b3b36be
commit 1e6d04c746

View file

@ -45,7 +45,7 @@ _plt_trampoline: # (obj, reloff)
pushl 20(%esp) # Copy of reloff
pushl 20(%esp) # Copy of obj
call _fixup_plt_entry # Call the binder
call _fixup_plt_entry@PLT # Call the binder
addl $8,%esp # pop binder args
movl %eax,20(%esp) # Store function to be called in obj