Subject: binutils: strip produces UNDEFINED instruction on armhf

From: Camm Maguire <[email-masked]>
Date: Mon, 24 Aug 2020 08:24:55 -0400

Package: binutils
Version: 2.35-2
Severity: important

Dear Maintainer,

strip -s on saved_gcl in package gcl transforms the following executable entry in .plt:

00020d9c <sigaction@plt>:
   20d9c:	4778      	bx	pc
   20d9e:	e7fd      	b.n	20d9c <sigaction@plt>
   20da0:	e28fc601 	add	ip, pc, #1048576	; 0x100000
   20da4:	e28ccab0 	add	ip, ip, #176, 20	; 0xb0000
   20da8:	e5bcf938 	ldr	pc, [ip, #2360]!	; 0x938

to the following entry which produces SIGILL (undefined instruction) at runtime:

00020d9c <sigaction@plt>:
   20d9c:	e7fd4778 			; <UNDEFINED> instruction: 0xe7fd4778
   20da0:	e28fc601 	add	ip, pc, #1048576	; 0x100000
   20da4:	e28ccab0 	add	ip, ip, #176, 20	; 0xb0000
   20da8:	e5bcf938 	ldr	pc, [ip, #2360]!	; 0x938

It is unclear how this is effected, as the contents of 0x20d9c through 0x20da8 are unmodified.

Thanks for your work on Debian!

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: armhf (armv7l)

Kernel: Linux 4.19.0-10-armmp-lpae (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages binutils depends on:
ii  binutils-arm-linux-gnueabihf  2.35-2
ii  binutils-common               2.35-2
ii  libbinutils                   2.35-2

binutils recommends no packages.

Versions of packages binutils suggests:
pn  binutils-doc  <none>

-- no debconf information

-- 
Camm Maguire			     		    [email-masked]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

---

From: Matthias Klose <[email-masked]>
Date: Mon, 21 Sep 2020 12:09:44 +0200

Camm, please could you report that upstream, together with a reproducer and/or
binary files?

Matthias