From owner-p4-projects@FreeBSD.ORG Mon Jul 17 11:22:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A56316A4E0; Mon, 17 Jul 2006 11:22:14 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03CBF16A4DD for ; Mon, 17 Jul 2006 11:22:14 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8E1143D6B for ; Mon, 17 Jul 2006 11:22:13 +0000 (GMT) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6HBMDvi076758 for ; Mon, 17 Jul 2006 11:22:13 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6HBMDHi076755 for perforce@freebsd.org; Mon, 17 Jul 2006 11:22:13 GMT (envelope-from gonzo@FreeBSD.org) Date: Mon, 17 Jul 2006 11:22:13 GMT Message-Id: <200607171122.k6HBMDHi076755@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 101751 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 11:22:14 -0000 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.