Skip to content

Commit

Permalink
SHN_ABS #3
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
  • Loading branch information
Cyrill Gorcunov committed Jun 9, 2015
1 parent 4dcee86 commit 926349d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions pie/piegen/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,15 @@ int handle_elf(const piegen_opt_t *opts, void *mem, size_t size)
continue;
if ((sym->st_shndx && sym->st_shndx < hdr->e_shnum) ||
sym->st_shndx == SHN_ABS) {
if (sym->st_shndx == SHN_ABS)
if (sym->st_shndx == SHN_ABS) {
sh_src = NULL;
else {
} else {
sh_src = sec_hdrs[sym->st_shndx];
ptr_func_exit(sh_src);
}
#if 0
if (ELF_ST_TYPE(sym->st_info) == STT_FUNC ||
ELF_ST_TYPE(sym->st_info) == STT_OBJECT)
#endif
pr_out("#define %s%s 0x%lx\n",
opts->prefix_name, name,
(unsigned long)(sym->st_value + sh_src ? sh_src->sh_addr : 0));
pr_out("#define %s%s 0x%lx\n",
opts->prefix_name, name,
(unsigned long)(sym->st_value + (sh_src ? sh_src->sh_addr : 0)));
}
}
}
Expand Down

0 comments on commit 926349d

Please sign in to comment.