NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/52491: crunched binaries have strange notes



>Number:         52491
>Category:       toolchain
>Synopsis:       crunched binaries have strange notes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 18 16:25:00 +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@localhost:/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



Home | Main Index | Thread Index | Old Index