bsd-user: image_info cleanups
cover bsd-user: image_info cleanups
This mirrors some changes I've posted for linux-user, removing stuff from image_info which is unused.
r~
Richard Henderson (3):
bsd-user: Remove ELF_START_MMAP and image_info.start_mmap
bsd-user: Remove image_info.mmap
bsd-user: Remove image_info.start_brk
bsd-user/arm/target_arch_elf.h | 1 - bsd-user/i386/target_arch_elf.h | 1 - bsd-user/qemu.h | 3 --- bsd-user/x86_64/target_arch_elf.h | 1 - bsd-user/elfload.c | 4 +--- bsd-user/main.c | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/3 bsd-user: Remove ELF_START_MMAP and image_info.start_mmap
The start_mmap value is write-only.
Remove the field and the defines that populated it.
--- bsd-user/arm/target_arch_elf.h | 1 - bsd-user/i386/target_arch_elf.h | 1 - bsd-user/qemu.h | 1 - bsd-user/x86_64/target_arch_elf.h | 1 - bsd-user/elfload.c | 1 - 5 files changed, 5 deletions(-)
bsd-user/arm/target_arch_elf.h +0 -1
@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x80000000#define ELF_ET_DYN_LOAD_ADDR 0x500000#define elf_check_arch (x) ((x) == EM_ARM)
bsd-user/i386/target_arch_elf.h +0 -1
@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x80000000#define ELF_ET_DYN_LOAD_ADDR 0x01001000#define elf_check_arch (x) (((x) == EM_386) || ((x) == EM_486))
bsd-user/qemu.h +0 -1
@@ -52,7 +52,6 @@ struct image_info {abi_ulong end_data;abi_ulong start_brk;abi_ulong brk; -abi_ulong start_mmap;abi_ulong mmap;abi_ulong rss;abi_ulong start_stack;
bsd-user/x86_64/target_arch_elf.h +0 -1
@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x2aaaaab000ULL#define ELF_ET_DYN_LOAD_ADDR 0x01021000#define elf_check_arch (x) (((x) == ELF_ARCH))
bsd-user/elfload.c +0 -1
@@ -738,7 +738,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,/* OK, This is the point of no return */ info->end_data =0 ; info->end_code =0 ; - info->start_mmap = (abi_ulong )ELF_START_MMAP ; info->mmap =0 ; elf_entry = (abi_ulong ) elf_ex.e_entry;
Signature · 1 line
2.34.1
Re: [PATCH 1/3] bsd-user: Remove ELF_START_MMAP and image_info.start_mmap
Quoted 5 lines · Richard Henderson
The
start_mmapvalue is write-only.
Remove the field and the defines that populated it.Signed-off-by Richard Henderson <[email protected]>
This one won't interfere with anything, but unless I hear otherwise, I'll queue it.
It applies to the blitz branch (though it needs a few more targets there), and none
of these files are being modified by Kariim Taha, my gsoc student.
Warner
Quoted 76 lines
--- bsd-user/arm/target_arch_elf.h | 1 - bsd-user/i386/target_arch_elf.h | 1 - bsd-user/qemu.h | 1 - bsd-user/x86_64/target_arch_elf.h | 1 - bsd-user/elfload.c | 1 - 5 files changed, 5 deletions(-)bsd-user/arm/target_arch_elf.h +0
-1@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x80000000#define ELF_ET_DYN_LOAD_ADDR 0x500000#define elf_check_arch (x) ((x) == EM_ARM)bsd-user/i386/target_arch_elf.h +0
-1@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x80000000#define ELF_ET_DYN_LOAD_ADDR 0x01001000#define elf_check_arch (x) (((x) == EM_386) || ((x) == EM_486))bsd-user/qemu.h +0
-1@@ -52,7 +52,6 @@ struct image_info {abi_ulong end_data;abi_ulong start_brk;abi_ulong brk; -abi_ulong start_mmap;abi_ulong mmap;abi_ulong rss;abi_ulong start_stack;bsd-user/x86_64/target_arch_elf.h +0
-1@@ -20,7 +20,6 @@#ifndef TARGET_ARCH_ELF_H #define TARGET_ARCH_ELF_H -#define ELF_START_MMAP 0x2aaaaab000ULL#define ELF_ET_DYN_LOAD_ADDR 0x01021000#define elf_check_arch (x) (((x) == ELF_ARCH))bsd-user/elfload.c +0
-2@@ -738,7 +738,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,/* OK, This is the point of no return */ info->end_data =0 ; info->end_code =0 ; - info->start_mmap = (abi_ulong )ELF_START_MMAP ; info->mmap =0 ; elf_entry = (abi_ulong ) elf_ex.e_entry; --2.34.1
PATCH 2/3 bsd-user: Remove image_info.mmap
In reply to Richard HendersonThis value is unused.
--- bsd-user/qemu.h | 1 - bsd-user/elfload.c | 1 - 2 files changed, 2 deletions(-)
bsd-user/qemu.h +0 -1
@@ -52,7 +52,6 @@ struct image_info {abi_ulong end_data;abi_ulong start_brk;abi_ulong brk; -abi_ulong mmap;abi_ulong rss;abi_ulong start_stack;abi_ulong entry;
bsd-user/elfload.c +0 -1
@@ -738,7 +738,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,/* OK, This is the point of no return */ info->end_data =0 ; info->end_code =0 ; - info->mmap =0 ; elf_entry = (abi_ulong ) elf_ex.e_entry;/* XXX Join this with PT_INTERP search? */
Signature · 1 line
2.34.1
Re: [PATCH 2/3] bsd-user: Remove image_info.mmap
Quoted 4 lines · Richard Henderson
This value is unused.
Signed-off-by Richard Henderson <[email protected]>]
Reviewed by: Warner Losh <[email protected]>
Same comments as patch 1/3.
Warner
Quoted 34 lines
--- bsd-user/qemu.h | 1 - bsd-user/elfload.c | 1 - 2 files changed, 2 deletions(-)bsd-user/qemu.h +0
-1@@ -52,7 +52,6 @@ struct image_info {abi_ulong end_data;abi_ulong start_brk;abi_ulong brk; -abi_ulong mmap;abi_ulong rss;abi_ulong start_stack;abi_ulong entry;bsd-user/elfload.c +0
-1@@ -738,7 +738,6 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs,/* OK, This is the point of no return */ info->end_data =0 ; info->end_code =0 ; - info->mmap =0 ; elf_entry = (abi_ulong ) elf_ex.e_entry;/* XXX Join this with PT_INTERP search? */--
2.34.1
PATCH 3/3 bsd-user: Remove image_info.start_brk
In reply to Richard HendersonThis has the same value is image_info.brk, which is also logged, and is otherwise unused.
--- bsd-user/qemu.h | 1 - bsd-user/elfload.c | 2 +- bsd-user/main.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-)
bsd-user/qemu.h +0 -1
@@ -50,7 +50,6 @@ struct image_info {abi_ulong end_code;abi_ulong start_data;abi_ulong end_data; -abi_ulong start_brk;abi_ulong brk;abi_ulong rss;abi_ulong start_stack;
bsd-user/elfload.c +1 -1
@@ -811,7 +811,7 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs, bprm->stringp, &elf_ex, load_addr, et_dyn_addr, interp_load_addr, info); info->load_addr = reloc_func_desc; - info->start_brk = info->brk = elf_brk; + info->brk = elf_brk; info->start_stack = bprm->p; info->load_bias =0 ;
bsd-user/main.c +0 -2
@@ -553,8 +553,6 @@ int main(int argc, char **argv)fprintf (f,"page layout changed following binary load\n" );page_dump (f); -fprintf (f,"start_brk 0x" TARGET_ABI_FMT_lx"\n" , - info->start_brk);fprintf (f,"end_code 0x" TARGET_ABI_FMT_lx"\n" , info->end_code); fprintf(f, "start_code 0x" TARGET_ABI_FMT_lx "\n",
Signature · 1 line
2.34.1
Re: [PATCH 3/3] bsd-user: Remove image_info.start_brk
Quoted 5 lines · Richard Henderson
This has the same value is image_info.brk, which is also logged, and is otherwise unused.
Signed-off-by Richard Henderson <[email protected]>
Same comments as 1/3.
Forgot on 1/3 to mention I'm planning on doing a pull request right after the
release (subject to our release engineer's ok) and can include this there.
Warner
Quoted 50 lines
--- bsd-user/qemu.h | 1 - bsd-user/elfload.c | 2 +- bsd-user/main.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-)bsd-user/qemu.h +0
-1@@ -50,7 +50,6 @@ struct image_info {abi_ulong end_code;abi_ulong start_data;abi_ulong end_data; -abi_ulong start_brk;abi_ulong brk;abi_ulong rss;abi_ulong start_stack;bsd-user/elfload.c +1
-1@@ -811,7 +811,7 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs, bprm->stringp, &elf_ex, load_addr, et_dyn_addr, interp_load_addr, info); info->load_addr = reloc_func_desc; - info->start_brk = info->brk = elf_brk; + info->brk = elf_brk; info->start_stack = bprm->p;info->load_bias = 0;bsd-user/main.c +0
-3@@ -553,8 +553,6 @@ int main(int argc, char **argv)fprintf (f,"page layout changed following binary load\n" );page_dump (f); -fprintf (f,"start_brk 0x" TARGET_ABI_FMT_lx"\n" , - info->start_brk);fprintf (f,"end_code 0x" TARGET_ABI_FMT_lx"\n" , info->end_code); fprintf(f, "start_code 0x" TARGET_ABI_FMT_lx "\n", --2.34.1
Re: [PATCH 3/3] bsd-user: Remove image_info.start_brk
Quoted 2 lines · Warner Losh
Forgot on 1/3 to mention I'm planning on doing a pull request right after the release (subject to our release engineer's ok) and can include this there.
Excellent, thanks.
r~
These all look good. Right now I'm planning on queueing them for the next pull request I have, which is all the reviewed changes from my GSoC student's work and one submission from another user in the bsd-user fork (I think, that one's up in the air). So next week sometime after the release (since last time I did a pull request on a late rc, it caused rebase issues and there's no reason for me not to wait).
Warner
Quoted 24 lines · Richard Henderson
This mirrors some changes I've posted for linux-user, removing stuff from
image_infowhich is unused.r~
Richard Henderson (3):
bsd-user: RemoveELF_START_MMAPand image_info.start_mmap
bsd-user: Remove image_info.mmap
bsd-user: Remove image_info.start_brkbsd-user/arm/target_arch_elf.h | 1 - bsd-user/i386/target_arch_elf.h | 1 - bsd-user/qemu.h | 3 --- bsd-user/x86_64/target_arch_elf.h | 1 - bsd-user/elfload.c | 4 +--- bsd-user/main.c | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-)--
2.34.1
Quoted 4 lines · Richard Henderson
Richard Henderson (3):
bsd-user: RemoveELF_START_MMAPand image_info.start_mmap
bsd-user: Remove image_info.mmap
bsd-user: Remove image_info.start_brk
Series:
Quoted 10 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Richard Henderson
Richard Henderson (3):
bsd-user: RemoveELF_START_MMAPand image_info.start_mmap
bsd-user: Remove image_info.mmap
bsd-user: Remove image_info.start_brkSeries:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Queued for post release freeze pull request.