Sort the .note.ABI-tag section always to the front of a binary.
Our kernel uses a special note section in the elf header to determine
which ABI emulation to use. However the kernel code expects this
section to reside in the first page of a binary.
Up to now, we were just lucky to get most of our binaries linked in a
way so that the note section by chance wound up in the first page.
Yet, this was never guaranteed to happen.
Recent changes to the static library build pushed the note section
after the first page (3rd order effect), so that the kernel could not
determine the correct ABI emulation anymore.
There are two possible fixes:
For one, the kernel could be changed to accept note sections located
anywhere in the binary. This however does not apply to already deployed
systems, which could face problems when upgrading.
Second, we could ensure that the note tag always winds up in the first
page of a binary. We take this approach by changing our linker scripts
to sort the .note.ABI-tag section to the front.