Maximum aligned attribute value in NXP GCC 9.2 Compiler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maximum aligned attribute value in NXP GCC 9.2 Compiler

1,236 Views
KKumar
Contributor II

Hi,

I am testing aligned attribute of variable.

It is working if I aligned variable "x" to 16 bytes and able to see in map file (0xc + 0x4 = 16)

KKumar_1-1667371077204.png

 

KKumar_0-1667371006308.png

 

 

But when I trying to align the variable to 64 , it aligned only to 32 bytes(0x1c + 0x4 = 32)

KKumar_2-1667371525707.pngKKumar_3-1667371568324.png

 

why it is not aligned to 64 bytes?? Is maximum alignment value 32 bytes??

 

Thanks

Kishore

0 Kudos
Reply
1 Reply

1,207 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

yes, there is linker limitation for maximal alignment size. GCC provides __BIGGEST_ALIGNMENT__ macro. 

 

You can find more details in gcc documentation:

https://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Type-Attributes.html

 

 

 

 

0 Kudos
Reply