Message ID | 20210826211201.98877-31-imp@bsdimp.com |
---|---|
State | New |
Headers | show |
Series | bsd-user updates to run hello world | expand |
On 8/26/21 11:11 PM, imp@bsdimp.com wrote: > 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(-) Move as patch #14? Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> On Aug 26, 2021, at 10:42 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > On 8/26/21 11:11 PM, imp@bsdimp.com wrote: >> 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(-) > > Move as patch #14? Are you suggesting I move this to be right after patch #14 or that I squash / fold it into patch #14? Warner > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
On 8/27/21 5:02 PM, Warner Losh wrote: >> On Aug 26, 2021, at 10:42 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >> >> On 8/26/21 11:11 PM, imp@bsdimp.com wrote: >>> 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(-) >> >> Move as patch #14? > > Are you suggesting I move this to be right after patch #14 or that I squash / fold it into patch #14? Move, if possible. If too much trouble (rebase conflict) then don't worry and let it here. > Warner > >> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >
> On Aug 27, 2021, at 9:58 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > On 8/27/21 5:02 PM, Warner Losh wrote: >>> On Aug 26, 2021, at 10:42 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >>> >>> On 8/26/21 11:11 PM, imp@bsdimp.com wrote: >>>> 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(-) >>> >>> Move as patch #14? >> >> Are you suggesting I move this to be right after patch #14 or that I squash / fold it into patch #14? > > Move, if possible. If too much trouble (rebase conflict) then > don't worry and let it here. Yea, there’s rebase failures that aren’t trivial to resolve :( Too many moving parts in this patch set. >> Warner >> >>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index a09f8fb315..c0787a4e52 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); info->load_addr = reloc_func_desc; @@ -842,15 +831,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;