Masao Uebayashi | 8 Mar 2006 02:54
Picon

error: no memory region specified for loadable section `.rodata'

Hi!

evbsh3 kernels don't build now, failing with the following error.  How
should I fix this?

Masao

#      link  COMPUTEXEVB/netbsd
/src/NetBSD/tools.evbsh3.HEAD/bin/sh--netbsdelf-ld -T
/src/NetBSD/src.TNF/sys/arch/evbsh3/conf/sh.x -e start -S -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
/src/NetBSD/tools.evbsh3.HEAD/bin/sh--netbsdelf-ld: error: no memory region specified for
loadable section `.rodata'

*** Failed target:  netbsd

Izumi Tsutsui | 8 Mar 2006 13:53
Picon
Gravatar

Re: error: no memory region specified for loadable section `.rodata'

> evbsh3 kernels don't build now, failing with the following error.  How
> should I fix this?

> [..]ld: error: no memory region specified for loadable section `.rodata'

Update ldscripts? (add "*(.rodata)" after "*(.text)" or so?)
---
Izumi Tsutsui

Masao Uebayashi | 9 Mar 2006 13:56
Picon

Re: error: no memory region specified for loadable section `.rodata'

Hi.

> Update ldscripts? (add "*(.rodata)" after "*(.text)" or so?)

I could fix this problem after I found evbsh3 is built as COFF. :-)

I'm preparing changes to evbsh3 so that kernels can be built again.
I'll post patches later.

Masao

Masao Uebayashi | 14 Mar 2006 08:30
Picon

Killing linker script in NetBSD/sh3

Hi!

This patch kills linker script along with converting evbsh3 from COFF
to ELF.  This fixes evbsh3 kernel build which has been broken for a
while.

Note I set default TEXTADDR to 0x8c010000 on evbsh3, which differs
from that of hpcsh, 0x8c001000.

I tested COMPUTEXEVB.  I need feedback from hpcsh users.

TIA,
Masao

Index: arch/sh3/conf/Makefile.sh3
===================================================================
RCS file: /src/NetBSD/cvsroot/src/sys/arch/sh3/conf/Makefile.sh3,v
retrieving revision 1.21
diff -u -r1.21 Makefile.sh3
--- arch/sh3/conf/Makefile.sh3	11 Dec 2005 12:18:58 -0000	1.21
+++ arch/sh3/conf/Makefile.sh3	14 Mar 2006 07:18:00 -0000
 <at>  <at>  -5,10 +5,10  <at>  <at> 
 # This makefile is constructed from a machine description:
 #	config machineid
 # Most changes should be made in the machine description
-#	/sys/arch/≤machine>/conf/``machineid''
+#	/sys/arch/≤arch>/conf/``machineid''
 # after which you should do
 #	config machineid
-# CPU generic makefile changes should be made in
(Continue reading)

Masao Uebayashi | 16 Mar 2006 09:52
Picon

Re: Killing linker script in NetBSD/sh3

(Only to port-sh3, because this is sh3 generic.)

This is a simplified (don't disturb irrelevant parts) version of
previous, plus converting all sh3 ports (dreamcast and mmeye were
missed).

Each port defines default TEXTADDR as DEFTEXTADDR.  If each kernel
config doesn't define TEXTADDR, DEFTEXTADDR is used.  This is what
other ports are doing. LINKFLAGS_NORMAL=-X is most ports are use too.

Tested only on COMPUTEXEVB (evbsh3).

Masao

Index: arch/dreamcast/conf/std.dreamcast
===================================================================
RCS file: /src/NetBSD/cvsroot/src/sys/arch/dreamcast/conf/std.dreamcast,v
retrieving revision 1.7
diff -u -r1.7 std.dreamcast
--- arch/dreamcast/conf/std.dreamcast	11 Dec 2005 12:17:06 -0000	1.7
+++ arch/dreamcast/conf/std.dreamcast	16 Mar 2006 08:29:21 -0000
 <at>  <at>  -18,4 +18,5  <at>  <at> 
 options 	IOM_RAM_SIZE=0x01000000         # 16MB

 makeoptions	ENDIAN="-EL"
-makeoptions	LDSCRIPTBASE="shl.x"	# for little endian
+#makeoptions	LDSCRIPTBASE="shl.x"	# for little endian
+makeoptions	DEFTEXTADDR="0x8c001000"
Index: arch/evbsh3/conf/std.evbsh3.eb
===================================================================
(Continue reading)

Valeriy E. Ushakov | 16 Mar 2006 14:31
Picon

Re: Killing linker script in NetBSD/sh3

On Thu, Mar 16, 2006 at 17:52:31 +0900, Masao Uebayashi wrote:

> Each port defines default TEXTADDR as DEFTEXTADDR.  If each kernel
> config doesn't define TEXTADDR, DEFTEXTADDR is used.  This is what
> other ports are doing. LINKFLAGS_NORMAL=-X is most ports are use too.

> --- arch/dreamcast/conf/std.dreamcast	11 Dec 2005 12:17:06 -0000	1.7
> +++ arch/dreamcast/conf/std.dreamcast	16 Mar 2006 08:29:21 -0000
>  <at>  <at>  -18,4 +18,5  <at>  <at> 
>  options 	IOM_RAM_SIZE=0x01000000         # 16MB
>  
>  makeoptions	ENDIAN="-EL"
> -makeoptions	LDSCRIPTBASE="shl.x"	# for little endian
> +#makeoptions	LDSCRIPTBASE="shl.x"	# for little endian

As you eliminate LDSCRIPTBASE usage from the makefile, why keep it in
the config?  (here and in all other ports).

I'd say - commit it.  If there is any fallout from this in some ports,
we can deal with it in the tree.

Thanks.

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen

Masao Uebayashi | 17 Mar 2006 17:09
Picon

Re: Killing linker script in NetBSD/sh3

> I'd say - commit it.  If there is any fallout from this in some ports,
> we can deal with it in the tree.

Done.

Masao


Gmane