Opened 17 years ago

Closed 5 years ago

#1768 closed bug (no change required)

Binutils 2.17 objdump Broken

Reported by: bonefish Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc: zooey
Blocked By: Blocking:
Platform: All

Description

Binutils 2.17 objdump (070218 gcc package from BeBits) crashes when disassembling (gcc 2.95.3 generated) objects with debug info (objdump -D --demangle ...). Can be reproduced under both Haiku and BeOS.

I tracked down one problem to a dereferenced NULL pointer in opcodes/i386-dis.c:print_insn() (first putop() call). Apparently the bug has already been fixed in CVS version 1.132 (2007/08/02 00:40:02) of the file.

I get a different stack trace for another test file (libperl.so compiled with "-g") though, so it seems not to be the only problem.

Update to newer binutils recommended.

Change History (7)

comment:1 by bonefish, 17 years ago

I gave the binutils 2.18 a try, but merging the eh-frame stuff scared the shit out of me. Maybe it's possible to update only opcodes...

comment:2 by waddlesplash, 10 years ago

Resolution: fixed
Status: newclosed

We're on 2.24 ATM. This has long since been fixed.

comment:3 by pulkomandy, 10 years ago

We are not on 2.24 for gcc2...

comment:4 by waddlesplash, 10 years ago

Resolution: fixed
Status: closedreopened
Version: R1/pre-alpha1R1/Development

Oh, I see. My bad.

comment:5 by cocobean, 7 years ago

Last edited 7 years ago by cocobean (previous) (diff)

comment:6 by cocobean, 7 years ago

Reviewed on hrev 51986 x86 - (gcc 2.95.3_2017-07-20, objdump 2013-04-21). We can close this ticket.

Easier for FOSS/Haiku devs to open a another terminal, setarch x86, and use the objdump 2.26.1 version.

NOTE: The reporter mentioned: "Update to newer binutils recommended." 10 years ago in which binutils 2.26.1 now available on Haiku. Haiku's binutils 2.17_gcc2 disassembler remains inaccurate on 'several' x86 processor opcodes so best to just use the included binutils 2.26.1_gcc7 disassembler as it seems more stable and accurate at this time. I created a patch to fix the objdump 2.17 issue, yet felt we need to move on. This helps current devs/testers focus on recent binutils 2.29/2.30 testing and deployment.

Technically, we can also use gdb and even: https://onlinedisassembler.com

Version 5, edited 7 years ago by cocobean (previous) (next) (diff)

comment:7 by pulkomandy, 5 years ago

Resolution: no change required
Status: reopenedclosed

Well, it doesn't seem to be that annoying since one can always use a more recent version of objdump now, in case they hit a similar problem.

Note: See TracTickets for help on using tickets.