summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 2fa9f46..222bc40 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -130,18 +130,12 @@ SYSCTL_INT(_vm, OID_AUTO, md_malloc_wait, CTLFLAG_RW, &md_malloc_wait, 0,
*/
#if defined(MD_ROOT_SIZE)
/*
+ * We put the mfs_root symbol into the oldmfs section of the kernel object file.
* Applications that patch the object with the image can determine
- * the size looking at the start and end markers (strings),
- * so we want them contiguous.
+ * the size looking at the oldmfs section size within the kernel.
*/
-static struct {
- u_char start[MD_ROOT_SIZE*1024];
- u_char end[128];
-} mfs_root = {
- .start = "MFS Filesystem goes here",
- .end = "MFS Filesystem had better STOP here",
-};
-const int mfs_root_size = sizeof(mfs_root.start);
+u_char mfs_root[MD_ROOT_SIZE*1024] __attribute__ ((section ("oldmfs")));
+const int mfs_root_size = sizeof(mfs_root);
#else
extern volatile u_char __weak_symbol mfs_root;
extern volatile u_char __weak_symbol mfs_root_end;
OpenPOWER on IntegriCloud