Damaged binaries when using binutils >= 2.34.90 (snapshot of 2.35.x) #4

Closed
opened 4 years ago by SlavekB · 2 comments
Owner

Basic information

  • TDE version: R14.0.9~pre
  • Distribution: Bullseye / SID
  • Hardware: any

Description

Probably something has changed in the BFD functions in binutils, because attaching metadata using tdelfeditor causes damage to binaries and libraries with the current binutils 2.35.x snapshot.

Steps to reproduce

  1. Upgrade to the binutils contained in the Debian Bullseye / SID.
  2. Build libr along with current binutils.
  3. Try to build tdelibs => it will cause FTBFS.

After adding the metadata, an attempt to run the binary reports:

cannot execute binary file: Exec format error

If it is built without tdelfeditor support, the build is successful.

## Basic information - TDE version: R14.0.9~pre - Distribution: Bullseye / SID - Hardware: any ## Description Probably something has changed in the BFD functions in binutils, because attaching metadata using `tdelfeditor` causes damage to binaries and libraries with the current binutils 2.35.x snapshot. ## Steps to reproduce 1. Upgrade to the binutils contained in the Debian Bullseye / SID. 2. Build libr along with current binutils. 3. Try to build tdelibs => it will cause FTBFS. After adding the metadata, an attempt to run the binary reports: ``` cannot execute binary file: Exec format error ``` If it is built without tdelfeditor support, the build is successful.
SlavekB added the SL/critical label 4 years ago
MicheleC added this to the R14.0.9 release milestone 4 years ago
Owner

with binutils 2.34.90, the ELF content is slightly different after the first tdelfeditor call on a file. The file is still usable. Subsequent usage of tdelfeditor on the same file result in the file being corrupted and the format error being reported.

This is the error reported on the second call to tdelfeditor on the same file

BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0, is this intentional?
BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0x4000, is this intentional?
BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0x5000, is this intentional?

with binutils 2.34.90, the ELF content is slightly different after the first tdelfeditor call on a file. The file is still usable. Subsequent usage of tdelfeditor on the same file result in the file being corrupted and the format error being reported. This is the error reported on the second call to tdelfeditor on the same file ``` BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0, is this intentional? BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0x4000, is this intentional? BFD: ./newTDEApp.34: warning: empty loadable segment detected at vaddr=0x5000, is this intentional? ```
MicheleC closed this issue 4 years ago
Owner

Fixed by PR #5

Fixed by PR #5
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/libr#4
Loading…
There is no content yet.