From 1e6d04c7462848bc47a09e51a2f375022bc3ed93 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 19 Feb 2021 08:58:17 +0100 Subject: [PATCH] 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. --- Userland/Libraries/LibELF/Arch/i386/plt_trampoline.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibELF/Arch/i386/plt_trampoline.S b/Userland/Libraries/LibELF/Arch/i386/plt_trampoline.S index 6eb5e96a5f..c2c563c8a4 100644 --- a/Userland/Libraries/LibELF/Arch/i386/plt_trampoline.S +++ b/Userland/Libraries/LibELF/Arch/i386/plt_trampoline.S @@ -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