Subject: Re: pkg/33723: file command doesn't show 'executable' for statically linked sun3 exec
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: pkgsrc-bugs
Date: 06/13/2006 22:20:02
The following reply was made to PR pkg/33723; it has been noted by GNATS.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org,
gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Cc:
Subject: Re: pkg/33723: file command doesn't show 'executable' for statically linked sun3 exec
Date: Tue, 13 Jun 2006 18:18:42 -0400
On Jun 13, 8:50pm, sigmfsk@aol.com (sigmfsk@aol.com) wrote:
-- Subject: pkg/33723: file command doesn't show 'executable' for statically
| >Number: 33723
| >Category: pkg
| >Synopsis: file command doesn't show 'executable' for statically linked sun3 exec
| >Confidential: no
| >Severity: non-critical
| >Priority: low
| >Responsible: pkg-manager
| >State: open
| >Class: change-request
| >Submitter-Id: net
| >Arrival-Date: Tue Jun 13 20:50:00 +0000 2006
| >Originator: Arthur Townsend
| >Release: 3.0
| >Organization:
| >Environment:
| NetBSD 3.0 NetBSD 3.0 (WITHSUNOS) #0: Mon Jun 12 22:40:11 EDT 2006 root@:/usr/src/sys/arch/sun3/compile/WITHSUNOS sun3
| >Description:
| When doing a 'file' on a sun3 dynamically linked executable, both SunOS NetBSD report the same thing: mc68020 demand paged dynamically linked executable not stripped.
| But when doing a 'file' on a sun3 statically linked executable, NetBSD does not document that the file is 'executable'. NetBSD shows: mc68020 demand paged not stripped, while SunOS shows: mc68020 demand paged executable not stripped". Although its a pretty good hint that the file is an exectuble, being that NetBSD shows "mc68020", I believe that the magic file could be improved by having it say "mc68020 executable" or such for statically linked executables.
| >How-To-Repeat:
| Create statically linked executable under Sun3 SunOS 4.1.1, then copy to any NetBSD system.
| >Fix:
| Update the magic file to change "mc68020" to "mc68020 executable" and change "dynamically linked executable" to "dynamically linked".
Here's a patch:
christos
Index: sun
===================================================================
RCS file: /src/pub/file/magic/Magdir/sun,v
retrieving revision 1.16
diff -u -u -r1.16 sun
--- sun 22 Mar 2004 20:03:22 -0000 1.16
+++ sun 13 Jun 2006 22:17:19 -0000
@@ -12,10 +12,12 @@
>>20 belong >4096 dynamically linked executable
>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0600410 sparc pure
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0600407 sparc
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
@@ -26,11 +28,14 @@
>>20 belong <4096 shared library
>>20 belong =4096 dynamically linked executable
>>20 belong >4096 dynamically linked executable
+>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0400410 mc68020 pure
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0400407 mc68020
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
@@ -41,11 +46,14 @@
>>20 belong <4096 shared library
>>20 belong =4096 dynamically linked executable
>>20 belong >4096 dynamically linked executable
+>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0200410 mc68010 pure
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
>16 belong >0 not stripped
+
0 belong&077777777 0200407 mc68010
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable