In verifying AArch64/ILP32 on hardware I ran across quite a few alignment issues, some of which were caused by the use of SUBALIGN() in the linker scripts mentioned here: https://devel.rtems.org/ticket/4178
SUBALIGN() was necessary for two reasons: * libc sysinit linker sets (this can be fixed in the sysinit handler struct) * splinkersets01 could not be made to pass on ILP32 as-is without SUBALIGN It seems that splinkersets01 makes the assumption that linker sets are aligned to no more than the size of a pointer. For ILP32, this is not the case since AArch64 hardware is very sensitive to misaligned accesses and many structs in linker sections need to be aligned to 8-byte boundaries to avoid throwing exceptions. Some may even need to be aligned to 16-byte boundaries depending on the structure, but this doesn't apply to splinkersets01. The resultant alignment padding causes many assertions in splinkersets01 to fail. I'm trying to find a way to make everything work together, but I'd like some input. The highlights with ILP32/LibBSD/hardware: * current codebase: stuffs a struct into a linker section with bad alignment and throws an exception * drop SUBALIGN and fix the sysinit issue: splinkersets01 fails, all other tests pass, code runs Paths forward: * disable splinkersets01 for AArch64/ILP32 BSPs * attempt to detect section alignment and adjust splinkersets01 as necessary * splitting the section up for different alignments would require touching every linker script * ? Hopefully I'm just missing something. Thanks, Kinsey
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel