Issue
I used arm-none-eabi-ld (GNU ld (2.34-4ubuntu1+13ubuntu1) 2.34) with --just-symbols=symbolfile
which includes following symbols.
a =0x00000050;
b =0x00000054;
c =0x00000058;
d =0x00001000;
e =0x00001004;
f =0x00001008;
g =0x00000060;
h =0x00000064;
i =0x00000068;
j =0x0000100c;
k =0x00001010;
l =0x00001014; <--- line 12
m =0x0000005c;
If I added symbol "l" , it will output error as following.
arm-none-eabi-ld:mcu1_.symtab: file format not recognized; treating as linker script
arm-none-eabi-ld:mcu1_.symtab:12: syntax error
But It's ok, if I used --defsym l=0x00001014
Does any prefix that I should add?
Solution
The answer is quite hidden in the GNU ld
documentation. Section Symbol Names says: Unquoted symbol names must not conflict with any keywords. Sadly, there's no list of keywords. But, Section MEMORY Command says: The keyword
LENGTH
may be abbreviated to len
or l
. (There's also an index entry l =
.) Apparently, l
is a keyword. So you could write e. g. "l" = 0x00001014;
.
Answered By - Armali Answer Checked By - Clifford M. (WPSolving Volunteer)