Why sram_bss is 16 bytes aligned?

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

Why sram_bss is 16 bytes aligned?

跳至解决方案
2,011 次查看
luhaiou
Contributor II

I use s32k3 RTD2.01,

file .ld in demo  

luhaiou_0-1692017796263.png

Why sram_bss is 16 bytes aligned? But  sram_data is 4byte aligned.

I wonder if sram_bss can be set to 4byte alignment, and if so, is there any bad effect?

Looking forward to your reply, thank you very much

 

0 项奖励
回复
1 解答
1,877 次查看
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @luhaiou , 

 

Very sorry to replying very lately. 

 

Please let us know if the issue is resolved or not. 

.bss is uninitialized data and .data is initialized data - so, to initialize data, if you want to use memset(3) (or some such typical routine), to initialize in bulk, then, the 16 byte alignment is likely to facilitate the use of an optimized version of the routine. 

I hope this may help. 

Thank you. Best regards. 

- Mehul Patel 

 

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,878 次查看
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @luhaiou , 

 

Very sorry to replying very lately. 

 

Please let us know if the issue is resolved or not. 

.bss is uninitialized data and .data is initialized data - so, to initialize data, if you want to use memset(3) (or some such typical routine), to initialize in bulk, then, the 16 byte alignment is likely to facilitate the use of an optimized version of the routine. 

I hope this may help. 

Thank you. Best regards. 

- Mehul Patel 

 

 

0 项奖励
回复