qsort: SHF_LINK_ORDER section sort
The linker SHF_LINK_ORDER section sorting had a number of defects.
1) The ordering was by VMA, which won't work with overlays. LMA is
better.
2) Zero size sections can result in two sections at the same LMA/VMA.
When only one of the two sections at the same LMA is zero size,
that one must be first.
3) Warnings given by elf_get_linked_section_vma won't ever be emitted
since elf_object_p warns and excludes objects with zero sh_link on
a SHF_LINK_ORDER section.
4) Section offset was adjusted down rather than up by section
alignment, possibly creating overlapping sections.
5) Finding the linked section did so the hard way, rather than simply
using elf_linked_to_section.
* elflink.c (elf_get_linked_section_vma): Delete.
(compare_link_order): Use elf_linked_to_section and sort by lma,
size, and id.
(elf_fixup_link_order): Use size_t variables where appropriate.
Make use of elf_linked_to_section. Formatting. Properly align
sections.