[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31469] New: readelf: erronously says "Cannot decode 64-bit
From: |
berteun at gmail dot com |
Subject: |
[Bug binutils/31469] New: readelf: erronously says "Cannot decode 64-bit note in 32-bit build" in 64-bit build when dumping notes of core file |
Date: |
Sun, 10 Mar 2024 10:13:21 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31469
Bug ID: 31469
Summary: readelf: erronously says "Cannot decode 64-bit note in
32-bit build" in 64-bit build when dumping notes of
core file
Product: binutils
Version: 2.42
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: berteun at gmail dot com
Target Milestone: ---
Given a simple program that core dumps like:
```
#include <stdexcept>
int main() {
throw std::runtime_error("error");
}
```
when reading the notes of the core dump readelf invariably display:
```
Displaying notes found at file offset 0x00000708 with length 0x00001450:
Owner Data size Description
CORE 0x00000150 NT_PRSTATUS (prstatus structure)
CORE 0x00000088 NT_PRPSINFO (prpsinfo structure)
CORE 0x00000080 NT_SIGINFO (siginfo_t data)
CORE 0x00000150 NT_AUXV (auxiliary vector)
CORE 0x00000492 NT_FILE (mapped files)
Cannot decode 64-bit note in 32-bit build
CORE 0x00000200 NT_FPREGSET (floating point registers)
```
This seems to have been a side effect of this change:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=625d49fce79d6154de07edc00b36335e7e7a0479
```
-#ifndef BFD64
if (!is_32bit_elf)
{
printf (_(" Cannot decode 64-bit note in 32-bit build\n"));
/* Still "successful". */
return true;
}
-#endif
```
It seems to me the entire if statement should have been removed, as removing
the #ifndef only now always makes it print it cannot decode a 64 bit note, even
in a 64 build. Previously this statement would have been compiled out.
Removing this works locally, but I have no 32 bit machine to test on.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31469] New: readelf: erronously says "Cannot decode 64-bit note in 32-bit build" in 64-bit build when dumping notes of core file,
berteun at gmail dot com <=