Pierre Habraken <Pierre.Habraken@imag.fr> writes:
The ELF specification states that table all local symbols in a symbol
should precede all global symbols.
mips-elf-as (binutils 2.20) disregards this rule.
Can anyone explain to me the reason for this ?
It's a historical issue. The SGI Irix 5 assembler did not follow this
rule, and the Irix 5 linker got confused when gas did try to follow
this rule. As I recall, Irix 5 thought the rule applied to
STT_SECTION symbols rather than to STB_LOCAL symbols. To work around
this we (or maybe just me) introduced all the elf_bad_symtab code.
Later this was extended to the IRIX_COMPAT and SGI_COMPAT code. We
can probably straighten out mips-elf-as if we try.