Options for sorting algorithms are severely limited when (a) you can't use malloc, (b) you don't have enough stack to recurse, and (c) you want a stable sort.
(The first two limitations are because this happens very early in the boot process.)
(The first two limitations are because this happens very early in the boot process.)
In this case however I'm putting all of the SYSINITs onto a linked list; mergesorting a linked list is easy.