diff options
| author | 2015-08-12 06:19:25 +0000 | |
|---|---|---|
| committer | 2015-08-12 06:19:25 +0000 | |
| commit | 414976a8924e019615ba9eff1608dfbb11c057eb (patch) | |
| tree | 52820fd90bd1b9b8d86c6789c05319e4ea4bcbe9 /sys/dev/ksyms.c | |
| parent | Check proper HPET period value during attach. (diff) | |
| download | wireguard-openbsd-414976a8924e019615ba9eff1608dfbb11c057eb.tar.xz wireguard-openbsd-414976a8924e019615ba9eff1608dfbb11c057eb.zip | |
Use a linker script when building i386 kernels to allow section padding on
PAGE_SIZE boundaries. This is required to enforce proper separation of
sections when adding page protections (coming shortly).
This was in snaps before release with no reported side effects.
ok deraadt@
Diffstat (limited to 'sys/dev/ksyms.c')
| -rw-r--r-- | sys/dev/ksyms.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ksyms.c b/sys/dev/ksyms.c index cdcb1fa0802..365664e550e 100644 --- a/sys/dev/ksyms.c +++ b/sys/dev/ksyms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksyms.c,v 1.28 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: ksyms.c,v 1.29 2015/08/12 06:19:25 mlarkin Exp $ */ /* * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> * Copyright (c) 2001 Artur Grabowski <art@openbsd.org> @@ -38,7 +38,8 @@ #endif extern char *esym; /* end of symbol table */ -#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) +#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) || \ + defined(__i386__) extern char *ssym; /* end of kernel */ #else extern long end; /* end of kernel */ @@ -60,7 +61,8 @@ void ksymsattach(int num) { -#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) +#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) || \ + defined(__i386__) if (esym <= ssym) { printf("/dev/ksyms: Symbol table not valid.\n"); return; @@ -74,7 +76,8 @@ ksymsattach(int num) #ifdef _NLIST_DO_ELF do { -#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) +#if defined(__sparc64__) || defined(__mips__) || defined(__amd64__) || \ + defined(__i386__) caddr_t symtab = ssym; #else caddr_t symtab = (caddr_t)&end; |
