Re: elf2ecoff endianness bugs
Adrian Chadd <[email protected]> Sat, 13 Dec 2025 22:01:13 -0800
| Newsgroups | gmane.os.netbsd.ports.mips.devel |
|---|---|
| Message-ID | <CAJ-Vmo=fyAMRd-Qqfmn4hZxKziUFHQZJdkok1VDJYTqP1bciSA@mail.gmail.com> |
oh interesting, I wonder if this is why I've not had any luck getting symbol table resolution working, aiee. I'll go try this next week and see if it helps my toolchain do the right thing. I'd really like to be able to turn addresses into symbols on my build machine to debug crashes ;-) -adrian On Fri, 5 Dec 2025 at 16:02, Steve Rumble <[email protected]> wrote: > > 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