advanced-microcode-patching / shiva

A custom ELF linker/loader for installing ET_REL binary patches at runtime
Other
146 stars 13 forks source link

Running shiva directly doesn't work on shiva-prelinked ELF binaries #19

Closed elfmaster closed 1 year ago

elfmaster commented 1 year ago

Currently a Shiva prelinked ELF binary will contain updated Dynamic segment records, and a modified PT_INTERP segment with the path to "/lib/shiva". We must have shiva-ld add an extra dynamic segment entry that holds the address to the string of the old PT_INTERP so that /lib/shiva knows to load "ld-linux.so", otherwise it will try to map itself again and crash.

elfmaster commented 1 year ago

Finished.

/lib/shiva /bin/ls /lib/shiva -u /bin/ls /lib/shiva fsplice_host.patched