SUSE / libpulp

libpulp enables live patching in user space applications.
GNU Lesser General Public License v2.1
55 stars 11 forks source link

Shrink prologue size #57

Closed giulianobelinassi closed 3 years ago

giulianobelinassi commented 3 years ago

Since commit 19e37546ebed6d10224b1e73fe74aa93b1949df8, prologues behaved as:

    function prologue:
        push    %rdi           <-- Unused!
        movq    $index, %rdi   <-- Unused!
  ┌───> jmp     0x0(%rip)
  │     <data>  <target function>
  │ function entry:
  └──── jmp     <function prologue>

The first two instructions in the prologue became purposeless, once they had no semantic behaviour in the program. This commit removes those two unused instructions in the prologue and reduce its size from 24 bytes to 16 bytes.

Signed-off-by: Giuliano Belinassi gbelinassi@suse.de