freebsd-skq/lib/csu
Ed Maste b0ec537031 mips: remove 16-byte alignment from .init and .fini epilogues
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
2019-05-20 20:48:04 +00:00
..
aarch64 Implement a BSD licensed crtbegin/crtend 2018-10-25 17:39:41 +00:00
amd64 csu: use BSD-1-clause license on csu files 2018-11-20 21:04:20 +00:00
arm Build the csu tests on all architectures. 2018-10-30 14:44:12 +00:00
common Add the missing 0 at the end of the .jcr section. 2018-11-24 18:23:53 +00:00
i386 csu: use BSD-1-clause license on csu files 2018-11-20 21:04:20 +00:00
mips mips: remove 16-byte alignment from .init and .fini epilogues 2019-05-20 20:48:04 +00:00
powerpc Create crtsavres.o for powerpc builds 2019-01-12 21:29:54 +00:00
powerpc64 Create crtsavres.o for powerpc builds 2019-01-12 21:29:54 +00:00
riscv Build the csu tests on all architectures. 2018-10-30 14:44:12 +00:00
sparc64 Add the (untested) mips and sparc64 .init call sequences. 2018-11-07 09:49:25 +00:00
tests Add explicit csu test dependency 2019-01-04 18:35:25 +00:00
Makefile Build the csu tests on all architectures. 2018-10-30 14:44:12 +00:00
Makefile.inc Implement a BSD licensed crtbegin/crtend 2018-10-25 17:39:41 +00:00