2015-12-07 07:21:23 |
Justin |
description |
Here is the code to show the problem.
uint32 * global_var[] = [ "123", "234", "456" ];
void function (void) {
uint32 * local_var[] = [ "123", "234", "456" ];
....
}
After compiling code with option -msingle-pic-base -mno-pic-data-is-text-relative,
The data.rel.global_var is generated in object file as expected.
But the data.rel.local_var is not !!!!!
So I did not knpw how to relocate the data.rel.local_var during run-time.
The problem may lead to relocation fail for local_var[].
BR, Justin |
Here is the code to reproduce the problem.
uint32 * global_var[] = [ "123", "234", "456" ];
void function (void) {
uint32 * local_var[] = [ "123", "234", "456" ];
....
}
After compiling code with option -msingle-pic-base -mno-pic-data-is-text-relative,
The data.rel.global_var is generated in object file as expected.
But the data.rel.local_var is not !!!!!
So I did not knpw how to relocate the data.rel.local_var during run-time.
The problem may lead to relocation fail for local_var[].
BR, Justin |
|
2015-12-07 07:22:06 |
Justin |
description |
Here is the code to reproduce the problem.
uint32 * global_var[] = [ "123", "234", "456" ];
void function (void) {
uint32 * local_var[] = [ "123", "234", "456" ];
....
}
After compiling code with option -msingle-pic-base -mno-pic-data-is-text-relative,
The data.rel.global_var is generated in object file as expected.
But the data.rel.local_var is not !!!!!
So I did not knpw how to relocate the data.rel.local_var during run-time.
The problem may lead to relocation fail for local_var[].
BR, Justin |
Here is the code to reproduce the problem.
uint32 * global_var[] = [ "123", "234", "456" ];
void function (void) {
uint32 * local_var[] = [ "123", "234", "456" ];
....
}
After compiling code with option -msingle-pic-base -mno-pic-data-is-text-relative,
The data.rel.global_var is generated in object file as expected.
But the data.rel.local_var is not !!!!!
So I did not know how to relocate the data.rel.local_var during run-time.
The problem may lead to relocation fail for local_var[].
BR, Justin |
|