mis-elf-as : local/global symbol order in symbol table
Pierre Habraken
Pierre.Habraken@imag.fr
Mon Apr 26 06:54:00 GMT 2010
Thanks a lot Jim for the story of mips elf and your detailed
explanations. Now things are clear to me. I just have to rebuild
binutils with mips-sde-elf in order to get traditional ELF assembler and
linker.
But will I have to rebuild also gcc, newlib and gdb ?
Pierre
Jim Wilson wrote:
> 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.
>
> Jim
--
Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr
Tél: 04 76 63 59 94 - Fax: 04 76 51 47 93
More information about the Binutils
mailing list