i want to generate hex file , that contains rodata as aligned 4 bytes . But my riscv compiler generate hex file ,that contains rodata as aligned 2 bytes. i have tried many methods
1.i have already tried ALIGN concepts in my linker.ld
2.im analysis my riscv compiler and find .lds files , i altered these files but no use there is no change in compilers behavior
in my c program, if rodata is 2 byte or lessthan 2 byte
rodata = {4444,0022}
ex :
00 : 4444
02 : 0000
04 : 0022
06 : 0000
in my c program ,if rodata is higher than two bytes
rodata = {ffff4444,00048888}
type here
ex :
00 : 4444
02 : ffff
04 : 8888
06 : 0004
this is my compilers behaviors , is there any option to generate hex that contains rodata as aligned 4 bytes ?
my expected output
00 : 00004444
04 : 00000022
please give me some idea, thankyou
Raja Gopal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.