[OpenWrt-Devel] [PATCH procd v3 14/17] ujail: DT_STRTAB uses d_ptr in d_un union (not d_val)
Etienne CHAMPETIER
champetier.etienne at gmail.com
Fri Nov 27 11:27:13 EST 2015
see
https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-42444/index.html
Signed-off-by: Etienne CHAMPETIER <champetier.etienne at gmail.com>
---
jail/elf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jail/elf.c b/jail/elf.c
index 7c52880..46c19df 100644
--- a/jail/elf.c
+++ b/jail/elf.c
@@ -182,7 +182,7 @@ static int elf32_scan_dynamic(const char *map, int dyn_offset, int dyn_size, int
if (curr->d_tag != DT_STRTAB)
continue;
- strtab = map + (curr->d_un.d_val - load_offset);
+ strtab = map + (curr->d_un.d_ptr - load_offset);
break;
}
@@ -216,7 +216,7 @@ static int elf64_scan_dynamic(const char *map, int dyn_offset, int dyn_size, int
if (curr->d_tag != DT_STRTAB)
continue;
- strtab = map + (curr->d_un.d_val - load_offset);
+ strtab = map + (curr->d_un.d_ptr - load_offset);
break;
}
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list