aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/unexelf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 5ce8050dcc8..edfaedb1dd2 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -791,7 +791,8 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
791 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB) 791 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB)
792 continue; 792 continue;
793 793
794 symnames = NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset + new_base; 794 symnames = ((byte *) new_base
795 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset);
795 symp = (Elf32_Sym *) (NEW_SECTION_H (n).sh_offset + new_base); 796 symp = (Elf32_Sym *) (NEW_SECTION_H (n).sh_offset + new_base);
796 symendp = (Elf32_Sym *) ((byte *)symp + NEW_SECTION_H (n).sh_size); 797 symendp = (Elf32_Sym *) ((byte *)symp + NEW_SECTION_H (n).sh_size);
797 798