AnsweredAssumed Answered

CW11.1 S12Z L4119 warning

Question asked by Edward Karpicz on Apr 20, 2020
Latest reply on Apr 23, 2020 by ZhangJennie

Hi,

 

WARNING L4119: Linker align value 4 is overwritten by its compiler align value 4 for object sgn

 

Looks like this warning is not documented I see it not specified in MCU\Help\MCU_Build_Tools_Utilities.pdf. 

It happens for const data object like

 

const long sgn[] = {0,1};

 

when I try to enable code aligning to DWORD boundary in PRM file:

 

ROM = READ_ONLY 0xFD0000 TO 0xFFFDFF ALIGN 4;

 

If this way to align is not appropriate then how else could I fix code misalignment? As well why such linkers complain if 4==4? S12Z CPU seems burning additional bus cycle for queue refill every time jumping to not double word aligned address. Compiler seems supporting code alignment as I see single byte BGND instructions (perhaps just 0x00 code and not BGND) inserted between functions in source disassembly listings. But since linker optimizes unused functions out, code alignment gets lost. ALIGN 4 for whole ROM segments helps making all functions aligned. Shouldn't compiler notice foo()'s size including code alignment, this way code alignment wouldn't be lost even without ALIGN in PRM?

 

Thanks

Edward

Outcomes