Bug 5179

Summary: bintuils-2.18 does not recognise i386 firmware built on Linux when using another OS
Product: binutils Reporter: Roy Marples <uberlord>
Component: binutilsAssignee: unassigned
Status: RESOLVED DUPLICATE    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.18   
Target Milestone: ---   
Host: i686-gentoo-freebsd6.2 Target: i686-gentoo-freebsd6.2
Build: i686-gentoo-freebsd6.2 Last reconfirmed:
Attachments: firmware in question

Description Roy Marples 2007-10-15 16:56:29 UTC
bintuils-2.18 does not recognise i386 firmware built on Linux when using another OS

This causes an issue when trying to link firmware into the kernel. Also happens
on sparc64, so it's probably a generic bug more than arch specific.

uberlaptop ~ # binutils-config 1; . /etc/profile
 * Switching to i686-gentoo-freebsd6.2-2.17 ...  [ ok ]
 * Please remember to run:
 *   # source /etc/profile

uberlaptop ~ # objdump -a nvenetlib.o

nvenetlib.o:     file format elf32-i386-freebsd
nvenetlib.o

uberlaptop ~ # binutils-config 2; . /etc/profile
 * Switching to i686-gentoo-freebsd6.2-2.18 ... [ ok ]
 * Please remember to run:
 *   # source /etc/profile

uberlaptop ~ # objdump -a nvenetlib.o
objdump: nvenetlib.o: File format not recognized

I don't think this is a dupe of ld/4424 as none of the patches supplied fix the
issue.

The best I could do to find the error, is that with 2.17
bfd_check_format_matches (format.c) temp = BFD_SEND_FMT (abfd,
_bfd_check_format, (abfd)); return a valid pointer where as in 2.18 it does not.
I don't know enough to investigate futher, hence posting here.
Comment 1 Roy Marples 2007-10-15 16:59:51 UTC
Created attachment 2042 [details]
firmware in question
Comment 2 H.J. Lu 2007-10-15 17:13:51 UTC

*** This bug has been marked as a duplicate of 4424 ***