Date: Mon, 17 Jul 2006 11:22:13 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 101751 for review Message-ID: <200607171122.k6HBMDHi076755@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101751 Change 101751 by gonzo@gonzo_hq on 2006/07/17 11:21:39 o When redefining HACK_EXTRA_FLAGS in arch Makefile, -shared should be set explicitly otherwise there isno .dynamic section in hack.So and therefor in resulting kernel image. o Get rid of -Ttext 0xYYYYYYYY in LDFLAGS, the proper way is to define it in config ffile as KERNVIRTADDR with further sed magic. Meanwhile it is hardcoded in ldscript as is. Affected files ... .. //depot/projects/mips2/src/sys/conf/Makefile.mips#9 edit .. //depot/projects/mips2/src/sys/conf/ldscript.mips#4 edit .. //depot/projects/mips2/src/sys/mips/conf/MALTA#6 edit .. //depot/projects/mips2/src/sys/mips/conf/QEMU#6 edit Differences ... ==== //depot/projects/mips2/src/sys/conf/Makefile.mips#9 (text+ko) ==== @@ -38,6 +38,7 @@ # kernel configuration file. ARCH_FLAGS?=-march=mips32 +HACK_EXTRA_FLAGS=-shared .if defined(MIPS_LITTLE_ENDIAN) CFLAGS+=-EL SYSTEM_LD+=-EL @@ -50,7 +51,6 @@ HACK_EXTRA_FLAGS+=-fno-pic -mno-abicalls $(ARCH_FLAGS) # XXX hardcoded kernel entry point -SYSTEM_LD+= -Ttext 0x80100000 ASM_FLAGS+=${CFLAGS} -D_LOCORE -DLOCORE %BEFORE_DEPEND ==== //depot/projects/mips2/src/sys/conf/ldscript.mips#4 (text+ko) ==== @@ -4,12 +4,13 @@ ENTRY(_start) SEARCH_DIR(/usr/lib); /* Do we need any of these for elf? - __DYNAMIC = 0; */ + __DYNAMIC = 0; PROVIDE (_DYNAMIC = 0); +*/ SECTIONS { /* Read-only sections, merged into text segment: */ - . = . + SIZEOF_HEADERS; + . = 0x80100000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } ==== //depot/projects/mips2/src/sys/mips/conf/MALTA#6 (text+ko) ==== @@ -27,9 +27,7 @@ # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNPHYSADDR=0xc0000000 -options KERNVIRTADDR=0xc0000000 -options PHYSADDR=0xc0000000 +options KERNVIRTADDR=0x80100000 include "../mips4k/malta/std.malta" hints "MALTA.hints" #Default places to look for devices. ==== //depot/projects/mips2/src/sys/mips/conf/QEMU#6 (text+ko) ==== @@ -28,9 +28,7 @@ # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNPHYSADDR=0xc0000000 -options KERNVIRTADDR=0xc0000000 -options PHYSADDR=0xc0000000 +options KERNVIRTADDR=0x80100000 include "../adm5120/std.adm5120" #hints "GENERIC.hints" #Default places to look for devices.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607171122.k6HBMDHi076755>