b0ec537031
The .init and .fini epilogues from crtn should be placed immediately after any instructions in .init and .fini sections from the linked objects. Using 16-byte alignment for the epilogues on MIPS was a bug, but it did not cause any issue with GNU ld as GNU ld (2.17.50) fills the padding with NOPs. Current versions of LLD fill any padding between different object files with trap instructions. Inserting trap padding prior to the .init/.fini epilogue is undesriable as the resulting binary will crash at runtime. The .init and .fini sections in object files linked between crti and crtn must already be a multiple of the instruction size and so no alignment directive is required in crtn. Indeed, other architectures (except sparc64) do not specify alignment in their crtn implementations. Reported by: arichardson Reviewed by: andrew Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D18291 |
||
---|---|---|
.. | ||
aarch64 | ||
amd64 | ||
arm | ||
common | ||
i386 | ||
mips | ||
powerpc | ||
powerpc64 | ||
riscv | ||
sparc64 | ||
tests | ||
Makefile | ||
Makefile.inc |