diff options
author | jchandra <jchandra@FreeBSD.org> | 2010-12-16 04:56:03 +0000 |
---|---|---|
committer | jchandra <jchandra@FreeBSD.org> | 2010-12-16 04:56:03 +0000 |
commit | 160618754617dcb25884d48bec4e40d6a98a1592 (patch) | |
tree | cfb3df700ed5e4fcd250ecb94fb9d78204244b53 /sys/mips | |
parent | 4db53c4394eb7b7b1c9da72ad337bf2aee1bb74c (diff) | |
download | FreeBSD-src-160618754617dcb25884d48bec4e40d6a98a1592.zip FreeBSD-src-160618754617dcb25884d48bec4e40d6a98a1592.tar.gz |
Make the ELF trampoline binary ELF executable (and do some cleanup).
- Remove the -shared flag for the trampoline binary, generate an
ELF executable instead of a shared object.
- No need to generate tmphack.S, move the code to sys/mips/mips/inckern.S
- No need generate opt_kernname.h, KERNNAME can be passed with -D
Reviewed by: gonzo, imp
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/elf_trampoline.c | 5 | ||||
-rw-r--r-- | sys/mips/mips/inckern.S | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/sys/mips/mips/elf_trampoline.c b/sys/mips/mips/elf_trampoline.c index 4b38761..70aedeb 100644 --- a/sys/mips/mips/elf_trampoline.c +++ b/sys/mips/mips/elf_trampoline.c @@ -42,7 +42,10 @@ __FBSDID("$FreeBSD$"); * need to include opt_global.h manually. */ #include "opt_global.h" -#include "opt_kernname.h" + +#ifndef KERNNAME +#error Kernel name not provided +#endif extern char kernel_start[]; extern char kernel_end[]; diff --git a/sys/mips/mips/inckern.S b/sys/mips/mips/inckern.S index 8610196..ca0e8d1 100644 --- a/sys/mips/mips/inckern.S +++ b/sys/mips/mips/inckern.S @@ -22,10 +22,23 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_kernname.h" - #include <machine/asm.h> __FBSDID("$FreeBSD$") + +ENTRY(_start) + PTR_LA t0, kernel_end + move sp, t0 + add sp, 0x2000 + and sp, ~0x7 + PTR_LA t0, _startC + j t0 + nop +END(_start) + +#ifndef KERNNAME +#error Need a kernel name here +#endif + .section ".real_kernel","aw" .globl kernel_start; kernel_start: |