[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31096] New: nm for mips32 (native or cross-compiled) shows
From: |
n.schier at avm dot de |
Subject: |
[Bug binutils/31096] New: nm for mips32 (native or cross-compiled) shows 32bit addresses as sign-extended 64bit addresses |
Date: |
Wed, 29 Nov 2023 12:28:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31096
Bug ID: 31096
Summary: nm for mips32 (native or cross-compiled) shows 32bit
addresses as sign-extended 64bit addresses
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: n.schier at avm dot de
Target Milestone: ---
nm for MIPS32 shows addresses from 0x8000000 and above as sign-extended(!)
64bit addresses. To reproduce:
$ cat <<-eof >test.c
int test(void) {
return 0;
}
eof
$ echo ". = 0x80000000;" >test.lds
$ mips-linux-gnu-gcc test.c -Wl,-T,test.lds -static -nostdlib
-ffreestanding -o test
$ mips-linux-gnu-nm test
ffffffff80000000 T test
$ x86_64-gnu-linux-nm test
80000000 T test
Tested with x86_64-cross-mips32-nm (binutils 2.33, 2.40 (alpine); 2.35, 2.41
(Debian)) as well as with native nm (under qemu-mips-chroot). (Same behaviour
was also observed with binutils-multiarch (Debian).)
Initially, the failure was observed during compilation of Linux for MIPS32,
where mips32-nm produces a System.map with sign-extended 64bit addresses.
Native x86_64-nm shows correct 32bit addresses on the same binary files.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31096] New: nm for mips32 (native or cross-compiled) shows 32bit addresses as sign-extended 64bit addresses,
n.schier at avm dot de <=