Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137904083
D23284.id67060.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1017 B
Referenced Files
None
Subscribers
None
D23284.id67060.diff
View Options
Index: sys/kern/link_elf.c
===================================================================
--- sys/kern/link_elf.c
+++ sys/kern/link_elf.c
@@ -51,6 +51,7 @@
#include <sys/fcntl.h>
#include <sys/vnode.h>
#include <sys/linker.h>
+#include <sys/sysctl.h>
#include <machine/elf.h>
@@ -389,6 +390,13 @@
extern vm_offset_t __startkernel, __endkernel;
+static unsigned long kern_relbase = KERNBASE;
+
+SYSCTL_ULONG(_kern, OID_AUTO, base_address, CTLFLAG_RD,
+ SYSCTL_NULL_ULONG_PTR, KERNBASE, "Kernel base address");
+SYSCTL_ULONG(_kern, OID_AUTO, relbase_address, CTLFLAG_RD,
+ &kern_relbase, 0, "Kernel relocated base address");
+
static void
link_elf_init(void* arg)
{
@@ -431,6 +439,7 @@
#ifdef __powerpc__
linker_kernel_file->address = (caddr_t)__startkernel;
linker_kernel_file->size = (intptr_t)(__endkernel - __startkernel);
+ kern_relbase = (unsigned long)__startkernel;
#else
linker_kernel_file->address += KERNBASE;
linker_kernel_file->size = -(intptr_t)linker_kernel_file->address;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 1:45 AM (17 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26262445
Default Alt Text
D23284.id67060.diff (1017 B)
Attached To
Mode
D23284: Add SYSCTL to get KERNBASE and relocated KERNBASE
Attached
Detach File
Event Timeline
Log In to Comment