PowerPC binary tagging

Daniel Jacobowitz drow@false.org
Mon Apr 16 13:07:00 GMT 2007


Hi Alan, and anyone else who has an opinion,

I've encountered twice this month problems with a lack of ABI tagging
on PowerPC binaries.  Both were in the context of GDB.  Andreas Schwab
pointed out that GDB passes vectors in the wrong place for
powerpc-linux, because GDB assumes -mabi=altivec, and a customer
discovered that GDB assumes -mhard-float for floating point arguments.
Of course, it's not just in GDB that this is a problem.  Like on many
other platforms, if the linker knew about the ABI issues, it could
warn when linking different ABIs together.

Has anyone thought about implementing this for PowerPC?  Do we have
spare ELF header bits, or should we use a separate section?  The
closest think I know if is the .PPC.EMB.apuinfo section, used to tag
SPE binaries, but that's coprocessor usage rather than ABI.

ARM has an extremely thorough solution to this problem - I don't know
if we want anything as thorough for PPC to be honest.  See Section 2,
Build Attributes.

  http://www.arm.com/pdfs/ABI-addenda.pdf

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list