From: Marcus Comstedt Date: Tue, 21 Oct 2014 10:05:46 +0000 (+0200) Subject: CopyLibsTask: Handle DT_RUNPATH as well as DT_RPATH X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0c38754cd357cb4a10ecf84686c7ca38926d876e;p=sigrok-androidutils.git CopyLibsTask: Handle DT_RUNPATH as well as DT_RPATH gold in binutils 2.24 (NDK r10c) sets DT_RUNPATH instead of DT_RPATH as default, so handle both. --- diff --git a/ant/src/org/sigrok/androidutils/ant/CopyLibsTask.java b/ant/src/org/sigrok/androidutils/ant/CopyLibsTask.java index 44af50d..58cfe25 100644 --- a/ant/src/org/sigrok/androidutils/ant/CopyLibsTask.java +++ b/ant/src/org/sigrok/androidutils/ant/CopyLibsTask.java @@ -142,7 +142,8 @@ public class CopyLibsTask extends Task String name = new String(s, offs, nul-offs, "US-ASCII"); offs += base; - if (d.d_tag == ElfFile.DT_RPATH) { + if (d.d_tag == ElfFile.DT_RPATH || + d.d_tag == ElfFile.DT_RUNPATH) { // Zap rpath, fixups.add(new Range(offs, offs + name.length())); } else { @@ -169,7 +170,8 @@ public class CopyLibsTask extends Task soname = getDynstr(d, strs, strsh.sh_offset); else if (d.d_tag == ElfFile.DT_NEEDED) addNeeded(getDynstr(d, strs, strsh.sh_offset)); - else if (d.d_tag == ElfFile.DT_RPATH) + else if (d.d_tag == ElfFile.DT_RPATH || + d.d_tag == ElfFile.DT_RUNPATH) addRpath(getDynstr(d, strs, strsh.sh_offset)); } }