aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-08-06 11:56:45 -0600
committerWarner Losh <imp@bsdimp.com>2021-09-10 14:13:06 -0600
commit2ab2b01c2b75d75758255c66ece81fde636e7f2b (patch)
treec8161f568a097d69774ed6290da4ff5340bad83b /bsd-user
parent98b34d354b5da78880cb39dc3a7db91c790f7c7d (diff)
bsd-user: Remove dead #ifdefs from elfload.c
LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it. Likewise, remove an #if 0 block that's not useful Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/elfload.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 6156f9775d..11ca813c7a 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -558,9 +558,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,
abi_ulong elf_entry, interp_load_addr = 0;
abi_ulong start_code, end_code, start_data, end_data;
abi_ulong reloc_func_desc = 0;
-#ifdef LOW_ELF_STACK
- abi_ulong elf_stack = ~((abi_ulong)0UL);
-#endif
load_addr = 0;
load_bias = 0;
@@ -761,11 +758,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,
exit(-1);
}
-#ifdef LOW_ELF_STACK
- if (TARGET_ELF_PAGESTART(elf_ppnt->p_vaddr) < elf_stack)
- elf_stack = TARGET_ELF_PAGESTART(elf_ppnt->p_vaddr);
-#endif
-
if (!load_addr_set) {
load_addr_set = 1;
load_addr = elf_ppnt->p_vaddr - elf_ppnt->p_offset;
@@ -823,9 +815,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,
close(bprm->fd);
-#ifdef LOW_ELF_STACK
- info->start_stack = bprm->p = elf_stack - 4;
-#endif
bprm->p = target_create_elf_tables(bprm->p, bprm->argc, bprm->envc,
bprm->stringp, &elf_ex, load_addr,
load_bias, interp_load_addr, info);
@@ -843,15 +832,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,
padzero(elf_bss, elf_brk);
-#if 0
- printf("(start_brk) %x\n" , info->start_brk);
- printf("(end_code) %x\n" , info->end_code);
- printf("(start_code) %x\n" , info->start_code);
- printf("(end_data) %x\n" , info->end_data);
- printf("(start_stack) %x\n" , info->start_stack);
- printf("(brk) %x\n" , info->brk);
-#endif
-
info->entry = elf_entry;
return 0;