This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mis-elf-as : local/global symbol order in symbol table

On 04/25/2010 01:20 PM, Pierre Habraken wrote:
I have to precise that I am not a mips programmer. I just supervise a
student project in which students have to program an assembler or a
simulator. The mips architecture was choosen for educational reasons
(not for technical reasons). Several students ask us why the "official"
assembler (mips-elf-as !) does not conform to the ELF specification
(this is rather confusing for them). Hence my post.

To expand a little on what Ian said...

ELF was invented by AT&T and Sun. SGI started from the ELF docs and wrote their own toolchain. The result is something that is technically ELF, but not entirely compatible with the original AT&T and Sun ELF toolchains, because SGI interpreted many things differently than AT&T and Sun did. Because the early GNU toolchain ports were for SGI workstations, this alternative ELF implementation was used as the basis for the mips-elf target.

Linux wanted traditional ELF support, so the GNU MIPS toolchains now actually support two different kinds of ELF object files. There is the "traditional ELF" support which is compatible with AT&T/Sun ELF files, and then there is the SGI ELF support which is compatible with SGI Irix5 and Irix6. SGI ELF is used by default for mips-sgi-irix* targets and mips*-elf. Traditional ELF is used for mips-linux, mips-*bsd, etc.

It might be nice to change mips-elf to use traditional ELF instead of SGI ELF, which is becoming obsolete. However, the mips-elf target has used SGI ELF for so long that this is likely to cause too much trouble for too many people, so it isn't clear when if ever we can make this change. In the meantime, there is the mips-sde-elf workaround though. The mips-sde-elf target does default to traditional ELF, and is very similar to the mips-elf target, except that it uses traditional ELF instead of SGI ELF.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]