Why sram_bss is 16 bytes aligned?

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

Why sram_bss is 16 bytes aligned?

Jump to solution
2,018 Views
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 Kudos
Reply
1 Solution
1,884 Views
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 

 

 

View solution in original post

0 Kudos
Reply
1 Reply
1,885 Views
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 Kudos
Reply