NetBSD Problem Report #52491
From martin@duskware.de Fri Aug 18 16:22:38 2017
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8470A7A176
for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 Aug 2017 16:22:38 +0000 (UTC)
Date: Fri, 18 Aug 2017 18:22:31 CEST
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: crunched binaries have strange notes
X-Send-Pr-Version: 3.95
>Number: 52491
>Category: toolchain
>Synopsis: crunched binaries have strange notes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 18 16:25:00 +0000 2017
>Closed-Date: Thu Nov 30 09:15:50 +0000 2017
>Last-Modified: Thu Nov 30 09:15:50 +0000 2017
>Originator: Martin Husemann
>Release: NetBSD 8.99.1
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD drowsy.duskware.de 8.99.1 NetBSD 8.99.1 (GENERIC) #92: Wed Aug 16 11:46:59 CEST 2017 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/shark/compile/GENERIC shark
Architecture: earmv4
Machine: shark
>Description:
Shark/eabi binaries show a strange behaviour:
When executing a crunched binary (e.g. /rescue/sh) the kernel complains:
/rescue/sh: Unknown elf note type 0 (unknown tag): [namesz=0, descsz=0 name=]
/rescue/sh: Unknown elf note type 7 (unknown tag): [namesz=0, descsz=0 name=]
This does not happen for other static binaries.
readelf -n output:
File: /rescue/sh
Displaying notes found at file offset 0x000000d4 with length 0x00000018:
Owner Data size Description
NetBSD 0x00000004 IDENT 899000100 (8.99.1)
Displaying notes found at file offset 0x00000100 with length 0x0000001c:
Owner Data size Description
NetBSD 0x00000007 MARCH <earmv4>
File: /bin/sh
Displaying notes found at file offset 0x00000128 with length 0x00000018:
Owner Data size Description
NetBSD 0x00000004 IDENT 899000100 (8.99.1)
Displaying notes found at file offset 0x00000140 with length 0x00000014:
Owner Data size Description
NetBSD 0x00000004 PaX <>
Displaying notes found at file offset 0x00000154 with length 0x0000001c:
Owner Data size Description
NetBSD 0x00000007 MARCH <earmv4>
and file(1) says:
/bin/sh: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /libexec/ld.elf_so, for NetBSD 8.99.1, compiled for: earmv4, not stripped
/rescue/sh: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for NetBSD 8.99.1, compiled for: earmv4, stripped
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: toolchain/52491: crunched binaries have strange notes
Date: Fri, 18 Aug 2017 22:27:05 +0200
On Fri, Aug 18, 2017 at 04:25:00PM +0000, martin@NetBSD.org wrote:
> When executing a crunched binary (e.g. /rescue/sh) the kernel complains:
>
> /rescue/sh: Unknown elf note type 0 (unknown tag): [namesz=0, descsz=0 name=]
> /rescue/sh: Unknown elf note type 7 (unknown tag): [namesz=0, descsz=0 name=]
I wonder if that is the same issue as with PT_TLS a while ago... Compare
the PT_NOTE entries before and after stripping please.
Joerg
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Thu, 30 Nov 2017 09:15:50 +0000
State-Changed-Why:
Superseeded by 52675
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.