Thank for your reply. I think you are right. And we do have the same page.
But my question is how to relocate it during runtime.
The difficulty I face that is .rel.data.global_var of global_var[] is belong to .rel.data which is a special section.
Any data points in the .rel.data are the target needed to relocated at runtime if I change the execution address.
But the .LC4 of local_var[] is belong to .data which is a generic section.
The ".data" section may includes data/data points with various types and are not only for relocation.
So I need to do a lot of extra effort to identify where the .LC4 is in data section.
But in my point of view, the best solution is the .LC4 of local_var[] should belong to .rel.data. not .data. then I don't need do anything extra for relocate .LC4 at runtime.
That is my problem.
Anyway thank for your time and sorry to reply late, and looking forward your reply.
Hi Andre:
Thank for your reply. I think you are right. And we do have the same page.
But my question is how to relocate it during runtime.
The difficulty I face that is .rel.data. global_ var of global_var[] is belong to .rel.data which is a special section.
Any data points in the .rel.data are the target needed to relocated at runtime if I change the execution address.
But the .LC4 of local_var[] is belong to .data which is a generic section.
The ".data" section may includes data/data points with various types and are not only for relocation.
So I need to do a lot of extra effort to identify where the .LC4 is in data section.
But in my point of view, the best solution is the .LC4 of local_var[] should belong to .rel.data. not .data. then I don't need do anything extra for relocate .LC4 at runtime.
That is my problem.
Anyway thank for your time and sorry to reply late, and looking forward your reply.
BR, Justin