e9patch icon indicating copy to clipboard operation
e9patch copied to clipboard

ELF binaries without DT_INIT

Open kilinitt opened this issue 3 years ago • 1 comments

Is there a workaround for ELF binaries without DT_INIT? Can one use a different tool like objcopy to add one prior to running e9patch/tool?

kilinitt avatar Sep 29 '21 04:09 kilinitt

I think it currently assumes that DT_INIT exists. This could be fixed, to use DT_INIT_ARRAY[0] as a backup.

If neither exist, then I am not sure. Maybe it is possible to inject a DT_INIT entry by overwriting another entry that is technically redundant, such as maybe DT_GNU_HASH.

GJDuck avatar Oct 02 '21 04:10 GJDuck

E9Patch will now use DT_INIT_ARRAY[0] if DT_INIT is missing.

GJDuck avatar Dec 14 '22 02:12 GJDuck