1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 02:55:20 +00:00

Don't output a warning about alignment when section address is defined by START or OFFSET and fits required alignment requirements

This commit is contained in:
Evgeny Vrublevsky 2018-10-17 22:05:21 +03:00 committed by Oliver Schmidt
parent 96196f00e9
commit d4088f9eee

View File

@ -1881,9 +1881,14 @@ unsigned CfgProcess (void)
*/
/* Check if the alignment for the segment from the linker
** config. is a multiple for that of the segment.
** config is a multiple for that of the segment.
** If START or OFFSET is provided instead of ALIGN, check
** if its address fits alignment requirements.
*/
if ((S->RunAlignment % S->Seg->Alignment) != 0) {
unsigned long AlignedBy = (S->Flags & SF_START) ? S->Addr
: (S->Flags & SF_OFFSET) ? (S->Addr + M->Start)
: S->RunAlignment;
if ((AlignedBy % S->Seg->Alignment) != 0) {
/* Segment requires another alignment than configured
** in the linker.
*/