Subject: toolchain/22073: gcc-3.3 and binutils-2.13.2.1 have inconsistent ENTRY defauts for NetBSD/sh3
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 07/06/2003 23:01:16
>Number:         22073
>Category:       toolchain
>Synopsis:       gcc-3.3 and binutils-2.13.2.1 have inconsistent ENTRY defauts for NetBSD/sh3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 06 14:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Izumi Tsutsui
>Release:        NetBSD 1.6U around 20030705
>Organization:
>Environment:
System: NetBSD 1.6U
Architecture: sh3
Machine: dreamcast
>Description:
gcc-3.3 and binutils-2.13.2.1 have different ENTRY defauts for NetBSD/sh3.
gcc-3.3 sets default ENTRY as "__start" (which is specified in
gcc/config/sh/netbsd-elf.h), but ld in binutils-2.13.2.1
(including our in-tree toolchain) sets _start for ENTRY
(that is specified in ld/emulparams/shelf_nbsd.sh).
See discussion on port-sh3 for details:
http://mail-index.netbsd.org/port-sh3/2003/07/05/0004.html

>How-To-Repeat:
Code inspection.

>Fix:
Fix ENTRY definition in ld/emulparams/shelf_nbsd.sh
to match gcc defaut:

--- ld/emulparams/shelf_nbsd.sh.orig	2003-07-05 19:50:29.000000000 +0900
+++ ld/emulparams/shelf_nbsd.sh	2003-07-05 19:22:32.000000000 +0900
@@ -9,7 +9,7 @@
 
 DATA_START_SYMBOLS='__data_start = . ;';
 
-ENTRY=_start
+ENTRY=__start
 
 unset EMBEDDED
 unset OTHER_SECTIONS
>Release-Note:
>Audit-Trail:
>Unformatted: