[PATCH 00/19] libctf, and CTF support for objdump and readelf

Nick Alcock nick.alcock@oracle.com
Fri May 24 20:09:00 GMT 2019


On 24 May 2019, Pedro Alves told this:

> On 5/24/19 5:04 PM, Nick Alcock wrote:
> If everything works in a cross endianness setting too (e.g., big endian
> host x little endian target) then you're golden.  :-)

It did when I tested it last, which was some weeks ago. The ctf_archive
format is fixed-endian (little-endian): everything else byteswaps at
open time if the magic number suggests it needs to, since at open time
it's reading it all in and blowing the dcache anyway and byteswapping
everything necessary costs nothing. (And means we can ignore endianness
everywhere else in the codebase.)

Note: the original CTF format (as seen on Solaris, FreeBSD etc) is
completely endian-ignorant. It looks like they never considered
endianness at all, so it's totally nonportable to machines of opposing
endianness. Whoops...



More information about the Binutils mailing list