From peter@dataloss.nl  Wed Mar 13 17:37:32 2002
Return-Path: <peter@dataloss.nl>
Received: from useful.dataloss.nl (useful.dataloss.nl [62.250.7.47])
	by hub.freebsd.org (Postfix) with SMTP id 10B6C37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 13 Mar 2002 17:37:31 -0800 (PST)
Received: (qmail 97408 invoked by uid 1001); 14 Mar 2002 01:37:28 -0000
Message-Id: <20020314013728.97407.qmail@useful.dataloss.nl>
Date: 14 Mar 2002 01:37:28 -0000
From: Peter van Dijk <peter@dataloss.nl>
Reply-To: Peter van Dijk <peter@dataloss.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /usr/bin/strip resets ABI type to FreeBSD
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35878
>Category:       gnu
>Synopsis:       [binutils] strip(1) resets ABI type to FreeBSD
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    dim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 13 17:40:01 PST 2002
>Closed-Date:    Mon May 07 03:51:00 UTC 2012
>Last-Modified:  Mon May 07 03:51:00 UTC 2012
>Originator:     Peter van Dijk
>Release:        FreeBSD 4.4-RELEASE-p4 i386
>Organization:
-
>Environment:
System: FreeBSD useful.dataloss.nl 4.4-RELEASE-p4 FreeBSD 4.4-RELEASE-p4 #3: Fri Jan 25 01:34:19 CET 2002 root@useful.dataloss.nl:/home/usr2/obj/usr/src/sys/USEFUL i386

>Description:
/usr/bin/strip resets the ABI type to FreeBSD when stripping a binary.

>How-To-Repeat:

(zone2sql is a statically compiled linux binary)

bash$ file zone2sql
zone2sql: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
bash$ strip zone2sql
bash$ file zone2sql
zone2sql: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), statically linked, stripped

>Fix:

workaround: brandelf -t Linux after stripping.
proposed fix: preserve ABI type while stripping.
>Release-Note:
>Audit-Trail:

From: =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= <bkoenig@alpha-tierchen.de>
To: bug-followup@freebsd.org
Cc: peter@dataloss.nl
Subject: Re: gnu/35878: /usr/bin/strip resets ABI type to FreeBSD
Date: Mon, 25 Jun 2007 21:52:21 +0200 (CEST)

 The problem still exists, but since it is neither serious nor critical and
 not the FreeBSD project's responsibility I suggest to close this PR. The
 bug should be fixed in the binutils and then imported with a new version
 of binutils.
 
 Bjrn
 
 
Responsible-Changed-From-To: freebsd-bugs->dim 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Sun Feb 20 05:04:52 UTC 2011 
Responsible-Changed-Why:  
Hi Dimitry, 

could you verify whether this issue was solved in binutils 2.17? Running 
strip(1) from devel/binutils (binutils-2.21) shows that this issue was fixed. 
Unfortunately i'm not still running binutil 2.15 and thus cannot verify this 
myself. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35878 

From: Dimitry Andric <dimitry@andric.com>
To: bug-followup@FreeBSD.org, peter@dataloss.nl
Cc:  
Subject: Re: gnu/35878: [binutils] strip(1) resets ABI type to FreeBSD
Date: Sun, 20 Feb 2011 12:26:09 +0100

 No, we still have a hack in our binutils that always sets the OSABI
 field to OSABI_FREEBSD.  This hack has been preserved for now, as
 removing it would cause too much trouble.  I think I can work on
 gradually getting rid of it, though.
 
 We actually need that, if we ever want to be able to build the base
 system with ToT binutils.
State-Changed-From-To: open->suspended 
State-Changed-By: arundel 
State-Changed-When: Sun Feb 20 22:55:13 UTC 2011 
State-Changed-Why:  
Suspend this PR for now. The current strip(1) behaviour is a local FreeBSD 
hack and required for now. Maybe at some point in the future it's possible 
to get rid of this hack. Anybody requiring the generic strip(1) behaviour is 
advised to go ahead and install devel/binutils. 
Thanks Dimitry for clearing things up. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35878 
State-Changed-From-To: suspended->closed 
State-Changed-By: eadler 
State-Changed-When: Mon May 7 03:50:59 UTC 2012 
State-Changed-Why:  
expected behavior, however unfortunate 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35878 
>Unformatted:
