Maximum aligned attribute value in NXP GCC 9.2 Compiler

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Maximum aligned attribute value in NXP GCC 9.2 Compiler

1,233 次查看
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 项奖励
回复
1 回复

1,204 次查看
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 项奖励
回复