[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/42] bsd-user: Remove dead #ifdefs from elfload.c
From: |
imp |
Subject: |
[PULL 31/42] bsd-user: Remove dead #ifdefs from elfload.c |
Date: |
Tue, 7 Sep 2021 15:53:21 -0600 |
From: Warner Losh <imp@FreeBSD.org>
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>
---
bsd-user/elfload.c | 20 --------------------
1 file changed, 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;
--
2.32.0
- [PULL 23/42] bsd-user: define max args in terms of pages, (continued)
- [PULL 23/42] bsd-user: define max args in terms of pages, imp, 2021/09/07
- [PULL 25/42] bsd-user: Add system independent stack, data and text limiting, imp, 2021/09/07
- [PULL 21/42] bsd-user: pull in target_arch_thread.h update target_arch_elf.h, imp, 2021/09/07
- [PULL 27/42] bsd-user: Implement --seed and initialize random state, imp, 2021/09/07
- [PULL 26/42] bsd-user: *BSD specific siginfo defintions, imp, 2021/09/07
- [PULL 30/42] bsd-user: elf cleanup, imp, 2021/09/07
- [PULL 32/42] bsd-user: Rewrite target system call definintion glue, imp, 2021/09/07
- [PULL 11/42] bsd-user: Eliminate elf personality, imp, 2021/09/07
- [PULL 24/42] bsd-user: Create target specific vmparam.h, imp, 2021/09/07
- [PULL 20/42] bsd-user: Move per-cpu code into target_arch_cpu.h, imp, 2021/09/07
- [PULL 31/42] bsd-user: Remove dead #ifdefs from elfload.c,
imp <=
- [PULL 33/42] bsd-user: update debugging in mmap.c, imp, 2021/09/07
- [PULL 36/42] bsd-user: add stubbed out core dump support, imp, 2021/09/07
- [PULL 35/42] bsd-user: Add target_os_user.h to capture the user/kernel structures, imp, 2021/09/07
- [PULL 39/42] bsd-user: move gemu_log to later in the file, imp, 2021/09/07
- [PULL 34/42] bsd-user: Add target_arch_reg to describe a target's register set, imp, 2021/09/07
- [PULL 38/42] bsd-user: Refactor load_elf_sections and is_target_elf_binary, imp, 2021/09/07
- [PULL 40/42] bsd-user: Implement interlock for atomic operations, imp, 2021/09/07
- [PULL 41/42] bsd-user: Add '-0 argv0' option to bsd-user/main.c, imp, 2021/09/07
- [PULL 37/42] bsd-user: elfload.c style catch up patch, imp, 2021/09/07
- [PULL 28/42] bsd-user: Move stack initializtion into a per-os file., imp, 2021/09/07