RFA: Add weak definition of __dso_handle for FRV, IQ2000, MN10300 and V850

Nick Clifton nickc@redhat.com
Wed May 21 03:56:00 GMT 2008


Hi Jeff,

  Please may I apply the patch below which adds a weak definition of
  the __dso_handle symbol to the FRV, IQ2000, MN10300 and V850 ports.
  This allows these ports to compile C++ programs, and in particular
  the G++ testsuite, when they are using NEWLIB rather than GLIBC.

Cheers
  Nick

newlib/ChangeLog
2008-05-20  Nick Clifton  <nickc@redhat.com>

	* libc/sys/sysnecv850/crt0.S (___dso_handle): Define (weak).

libgloss/ChangeLog
2008-05-20  Nick Clifton  <nickc@redhat.com>

	* iq2000/crt0.S (__dso_handle): Define (weak).
	* frv/crt0.S (__dso_handle): Define (weak).
	* mn10300/crt0.S (___dso_handle): Define (weak).

Index: newlib/libc/sys/sysnecv850/crt0.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/sysnecv850/crt0.S,v
retrieving revision 1.3
diff -c -3 -p -r1.3 crt0.S
*** newlib/libc/sys/sysnecv850/crt0.S	31 Jul 2003 16:21:20 -0000	1.3
--- newlib/libc/sys/sysnecv850/crt0.S	20 May 2008 07:01:45 -0000
*************** _start:
*** 60,67 ****
  	jarl    _main,		r31
  	mov     r10,		r6
  	jarl    _exit,		r31
- 
  # endif
  
  	.section .stack
  _stack:	.long 	1
--- 60,72 ----
  	jarl    _main,		r31
  	mov     r10,		r6
  	jarl    _exit,		r31
  # endif
  
  	.section .stack
  _stack:	.long 	1
+ 
+ 	.section .data
+ 	.global ___dso_handle
+ 	.weak   ___dso_handle
+ ___dso_handle:
+ 	.long	0
Index: libgloss/frv/crt0.S
===================================================================
RCS file: /cvs/src/src/libgloss/frv/crt0.S,v
retrieving revision 1.3
diff -c -3 -p -r1.3 crt0.S
*** libgloss/frv/crt0.S	24 Mar 2004 01:11:24 -0000	1.3
--- libgloss/frv/crt0.S	20 May 2008 07:01:45 -0000
*************** EXT(__frv_fix_usrptrs):
*** 268,270 ****
--- 268,276 ----
  .Lret3:	ret
  .Lend3:
  	.size	EXT(__frv_fix_usrptrs),.Lend2-EXT(__frv_fix_usrptrs)
+ 
+ 	.section .data
+ 	.global __dso_handle
+ 	.weak __dso_handle
+ __dso_handle:
+ 	.long	0
Index: libgloss/iq2000/crt0.S
===================================================================
RCS file: /cvs/src/src/libgloss/iq2000/crt0.S,v
retrieving revision 1.1
diff -c -3 -p -r1.1 crt0.S
*** libgloss/iq2000/crt0.S	6 Jun 2003 16:07:57 -0000	1.1
--- libgloss/iq2000/crt0.S	20 May 2008 07:01:45 -0000
*************** _start:
*** 54,56 ****
--- 54,62 ----
  	xor %5,%5,%5
  	jal exit		# all done, no need to return or
  	or %4,%0,%2		# exit with main's return value
+ 
+ 	.section .data
+ 	.global __dso_handle
+ 	.weak __dso_handle
+ __dso_handle:
+ 	.long	0
Index: libgloss/mn10300/crt0.S
===================================================================
RCS file: /cvs/src/src/libgloss/mn10300/crt0.S,v
retrieving revision 1.1
diff -c -3 -p -r1.1 crt0.S
*** libgloss/mn10300/crt0.S	17 Mar 2000 22:48:51 -0000	1.1
--- libgloss/mn10300/crt0.S	20 May 2008 07:01:45 -0000
*************** _start:
*** 56,58 ****
--- 56,64 ----
  
  	.section .stack
  _stack:	.long 	1
+ 
+ 	.section .data
+ 	.global ___dso_handle
+ 	.weak ___dso_handle
+ ___dso_handle:
+ 	.long	0



More information about the Newlib mailing list