diff options
author | Olivier Houchard <cognet@FreeBSD.org> | 2007-07-27 14:42:25 +0000 |
---|---|---|
committer | Olivier Houchard <cognet@FreeBSD.org> | 2007-07-27 14:42:25 +0000 |
commit | 23f9626539e83e3b8e0da9853ee5aaadc8309e96 (patch) | |
tree | 848068f78ac5d3e527b322ac71a8b86a04b69477 /sys/conf/Makefile.arm | |
parent | 425b5be335e7b8fa148ce86992a6330112e8ee50 (diff) | |
download | src-23f9626539e83e3b8e0da9853ee5aaadc8309e96.tar.gz src-23f9626539e83e3b8e0da9853ee5aaadc8309e96.zip |
Bring in two bandaids to get the elf trampoline to work again, until I find
a proper solution.
- Add a dummy entry point which just calls the C entry points, and try to make
sure it's the first code in the binary.
- Copy a bit more than func_end to try to copy the whole load_kernel()
function. gcc4 puts code behind the func_end symbol.
Approved by: re (blanket)
Notes
Notes:
svn path=/head/; revision=171619
Diffstat (limited to 'sys/conf/Makefile.arm')
-rw-r--r-- | sys/conf/Makefile.arm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 10a98828ccc4..4ac4a07bb943 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -66,23 +66,27 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\ FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_arm7tdmi.S \ $S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \ $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \ - $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S + $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ + $S/$M/$M/cpufunc_asm_xscale_c3.S trampoline: ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \ ldscript.$M.tramp.noheader + echo "#include <machine/asm.h>" >tmphack.S + echo "ENTRY(_start)" >>tmphack.S + echo "bl _startC" >>tmphack.S ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \ -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ - $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} \ - -o ${KERNEL_KO}.tramp + tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ - $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o \ - ${KERNEL_KO}.tramp.noheader + tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.tramp.bin ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp @@ -95,15 +99,15 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h ${CC} -O2 -DKZIP -I. -c $S/kern/inflate.c -o inflate-tramp.o ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ - -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp + -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ + $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ - -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader + -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ + $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ - inflate-tramp.o + inflate-tramp.o tmphack.S %BEFORE_DEPEND |