NetBSD Problem Report #32972

From  Fri Mar  3 00:07:57 2006
Return-Path: <>
Received: by (Postfix, from userid 31301)
	id 2D67963B8EB; Fri,  3 Mar 2006 00:07:57 +0000 (UTC)
Message-Id: <>
Date: Fri,  3 Mar 2006 00:07:57 +0000 (UTC)
Subject: gdb doesn't recognize binaires compiled with binutils 2.16
X-Send-Pr-Version: www-1.0

>Number:         32972
>Category:       port-sh3
>Synopsis:       gdb doesn't recognize binaires compiled with binutils 2.16
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sh3-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 03 00:10:00 +0000 2006
>Closed-Date:    Tue Mar 07 02:22:15 +0000 2006
>Last-Modified:  Tue Mar 07 02:22:15 +0000 2006
>Originator:     Valeriy E. Ushakov
>Release:        -current
NetBSD nada 3.99.15 NetBSD 3.99.15 (NADA) #31: Sun Feb 26 06:18:58 MSK 2006  uwe@sampo:/export/netbsd/cvs/src/sys/arch/hpcsh/compile/NADA hpcsh
In binutils 2.16 support for SuperH has been rototilled.  In particular,
they now handle superh variants differently.  Since gdb53 uses old libfd,
it doesn't recognize binaries compiled with new binutils as superh binaries.
$ readelf -h /bin/echo | grep Flags
  Flags:                             0x2, sh2
$ gdb -q /bin/echo
(no debugging symbols found)...(gdb)
$ readelf -h /bin/ls | grep Flags
  Flags:                             0x16, unknown ISA
$ gdb -q /bin/ls
"/bin/ls": not in executable format: File format not recognized

Readelf has been fixed actually, but a copy of libbfd that comes with gdb53
need to be tought the new flags.



From: "Valeriy E. Ushakov" <>
Subject: PR/32972 CVS commit: src/gnu/dist/gdb
Date: Tue,  7 Mar 2006 02:16:23 +0000 (UTC)

 Module Name:	src
 Committed By:	uwe
 Date:		Tue Mar  7 02:16:23 UTC 2006

 Modified Files:
 	src/gnu/dist/gdb/bfd: elf32-sh-nbsd.c
 	src/gnu/dist/gdb/include/elf: sh.h

 Log Message:
 In binutils 2.16 new SuperH flags were introduced.  Since we still use
 old gdb, teach it new flags, so that it can recognize binaries compiled
 with new binutils.  For new flags set arch to an approximate superset
 that this version of bfd knows about.  This is good enough for gdb.

 PR port-sh3/32972

 To generate a diff of this commit:
 cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gdb/bfd/elf32-sh-nbsd.c
 cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gdb/include/elf/sh.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-When: Tue, 07 Mar 2006 02:22:15 +0000
Fixed by teaching gdb's copy of bfd new flags.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.