Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139452001
D30926.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30926.diff
View Options
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1333,7 +1333,6 @@
imgp->reloc_base = addr;
imgp->proc->p_osrel = osrel;
imgp->proc->p_fctl0 = fctl0;
- imgp->proc->p_elf_machine = hdr->e_machine;
imgp->proc->p_elf_flags = hdr->e_flags;
ret:
@@ -1806,8 +1805,10 @@
Elf_Phdr *phdr;
Elf_Shdr *shdr;
struct phdr_closure phc;
+ Elf_Brandinfo *bi;
ehdr = (Elf_Ehdr *)hdr;
+ bi = td->td_proc->p_elf_brandinfo;
ehdr->e_ident[EI_MAG0] = ELFMAG0;
ehdr->e_ident[EI_MAG1] = ELFMAG1;
@@ -1820,7 +1821,7 @@
ehdr->e_ident[EI_ABIVERSION] = 0;
ehdr->e_ident[EI_PAD] = 0;
ehdr->e_type = ET_CORE;
- ehdr->e_machine = td->td_proc->p_elf_machine;
+ ehdr->e_machine = bi->machine;
ehdr->e_version = EV_CURRENT;
ehdr->e_entry = 0;
ehdr->e_phoff = sizeof(Elf_Ehdr);
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -120,7 +120,7 @@
"struct proc KBI p_filemon");
_Static_assert(offsetof(struct proc, p_comm) == 0x27c,
"struct proc KBI p_comm");
-_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c,
+_Static_assert(offsetof(struct proc, p_emuldata) == 0x308,
"struct proc KBI p_emuldata");
#endif
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -700,7 +700,6 @@
pid_t p_reapsubtree; /* (e) Pid of the direct child of the
reaper which spawned
our subtree. */
- uint16_t p_elf_machine; /* (x) ELF machine type */
uint64_t p_elf_flags; /* (x) ELF flags */
void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for
non ELF binaries. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 13, 6:20 AM (4 m, 39 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26923589
Default Alt Text
D30926.diff (1 KB)
Attached To
Mode
D30926: Eliminate p_elf_machine from struct proc.
Attached
Detach File
Event Timeline
Log In to Comment