[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

2024-03-10 Thread berteun at gmail dot com
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 

int main() {
throw std::runtime_error("error");
}
```

when reading the notes of the core dump readelf invariably display:

```
Displaying notes found at file offset 0x0708 with length 0x1450:
  OwnerData sizeDescription
  CORE 0x0150   NT_PRSTATUS (prstatus structure)
  CORE 0x0088   NT_PRPSINFO (prpsinfo structure)
  CORE 0x0080   NT_SIGINFO (siginfo_t data)
  CORE 0x0150   NT_AUXV (auxiliary vector)
  CORE 0x0492   NT_FILE (mapped files)
Cannot decode 64-bit note in 32-bit build
  CORE 0x0200   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/30479] bfd.info build failure on centos 8

2024-03-10 Thread nightstrike at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30479

--- Comment #4 from nightstrike  ---
Looks like this is still a problem with the 2.42 release, at least on an ubuntu
system without makeinfo installed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/30479] bfd.info build failure on centos 8

2024-03-10 Thread nightstrike at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30479

--- Comment #5 from nightstrike  ---
(In reply to nightstrike from comment #3)
> Ok, I worked around it for now by touching bfd/doc/bfd.info and
> gas/doc/as.info (which also exhibited the problem) in the source dir.  I had
> to do this individually, and before each rebuild.  I think the build system
> can be improved here, though.  And certainly, texinfo should be buildable.

This workaround no longer works, as texi files are created in the build dir
that cause the bfd.info rule to be out of date.  It depends on doc/bfd.text in
the source dir, which is fine, but it also depends on doc/*.texi that are
picked up in the build dir, which is not fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.