From 8e6a1501ab9d8020950bc1883d14d14dd76fdb5f Mon Sep 17 00:00:00 2001 From: norly Date: Fri, 21 Jun 2013 22:36:36 +0100 Subject: [PATCH] Use .rela.plt too - need this for x86-64 --- src/libelfu/model/symtab.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libelfu/model/symtab.c b/src/libelfu/model/symtab.c index 165e00e..1dd778e 100644 --- a/src/libelfu/model/symtab.c +++ b/src/libelfu/model/symtab.c @@ -28,6 +28,10 @@ static GElf_Word pltLookupVal(ElfuElf *me, char *name) GElf_Word j; relplt = elfu_mScnForall(me, subFindByName, ".rel.plt", NULL); + if (!relplt) { + /* x86-64 uses .rela.plt instead */ + relplt = elfu_mScnForall(me, subFindByName, ".rela.plt", NULL); + } if (!relplt) { ELFU_WARN("dynsymLookupVal: Could not find .rel.plt section in destination ELF.\n"); return 0; -- 2.30.2