Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

elf2ecoff endianness bugs



Hello,

elf2ecoff isn't generating valid symbol tables. It's both byte swapping when it shouldn't (same host and target endianness) and not swapping when it should.

For example, my crosstool objdump doesn't like an elf2ecoff'd sgimips kernel generated on amd64:

$ mipseb--netbsd-objdump -x netbsd.ecoff > /dev/null
mipseb--netbsd-objdump: failed to read symbol table from: netbsd.ecoff
mipseb--netbsd-objdump: error message was: file truncated

Same goes for an hpcmips (mipsel) kernel generated on amd64:
$ mipsel--netbsd-objdump -x netbsd.ecoff > /dev/null
mipsel--netbsd-objdump: netbsd.ecoff: bad value

The attached patch makes objdump able to read the ecoff symbol tables again.

Steve

Attachment: elf2ecoff.c.diff
Description: Binary data



Home | Main Index | Thread Index | Old Index