Re: The magical mystical changing ethernet interface order

Linus Torvalds
2003-05-08T17:24:39Z

In article <1052395526.23259.0.camel@rth.ninka.net>,
David S. Miller <davem@redhat.com> wrote:
>On Wed, 2003-05-07 at 15:28, Dave Hansen wrote:
>> The linker will order things in the final object in the order that you
>> passed them. We depend on this for getting __init functions run in the
>> right order:
>
>This is absolutely not guarenteed. The linker is at liberty to
>reorder objects in any order it so desires, for performance reasons
>etc.
>
>Any reliance on link ordering is broken and needs to be fixed.

No. Last time this came up rth spoke up and said that link ordering _is_
guaranteed.

The kernel depends on this in a lot more ways than just initcalls, btw:
all the exception handling etc also depend on the linker properly
preserving ordering of text/data sections.

If the linker ever starts re-orderign things, we'll just either not
upgrade to a broken linker, or we'll require a flag that disables the
re-ordering.

End of discussion.

Linus