Let's say I have an object file (elf file) created from asm source:
.text
.code 32
MOV R1, #10
LDR R2, [R1]
.string "hello world"
fun1:
MOV R1, #1
LDR R2, =_symbol1
LDR R3, =_symbol2
b _reset
.end
Running arm-elf-nm gives me symbols:
U _reset
U _symbol1
U _symbol2
t fun1
So the 3 symbols used to load some addresses to registers are undefined. Now let's use arm-elf-objcopy to make a binary file. I assume that the binary file consinsts of plain bits, no relocation whatsoever.
My question is: will the _symbol1 and _symbol2 be replaced with 0's if they were undefined? On the other hand, if they were defined,
.equ _symbol1 0x400
.equ _symbol2 0x500
would they be replaced with those values?