Commit 49f7f05f authored by Alpha Lam's avatar Alpha Lam
Browse files

asm_*_offsets to define variables as constants

This change is to allow obj_int_extract to extract all integers
in the data segment. With the const keyword these variables are
forced into the .rodata segment even for zero variable value.

We had a problem before that zero valueed variables would get
assigned to BSS segment that fooled obj_int_extract to give
incorrect values.

Change-Id: Icd94f80a8ab356879894ca508bf132d20b865299
parent 0f7e4665
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#define BEGIN int main(void) { #define BEGIN int main(void) {
#define END return 0; } #define END return 0; }
#else #else
#define DEFINE(sym, val) int sym = val; #define DEFINE(sym, val) const int sym = val;
#define BEGIN #define BEGIN
#define END #define END
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment