hreintke wrote:Sorry to bother you again but I tried to understand and follow your advice and got stuck again.Using a mixture of objdump and nm making your way through the symbol definitions while having the elf specification open. I avoid that.
1/ You can follow your way through the symbols using objdump on the lib.
What would be the way to : follow through the symbols ?
If there is a document/location where that is described, I be happy to go from there.
2/ do the objdump on the elf image of the firmware
Do you mean with the elf image of the firmware the output of the linker ?
In my case the linker output file is app.out.
When I do the objdump -d -z on that and look for the <system_get_sdk_version> I getCode: Select all4020bf8a: c40000 extui a0, a0, 0, 13
4020bf8d: 3ffe87 bbsi a14, 24, 4020bfd0 <divide+0x34>
4020bf90 <system_get_sdk_version>:
4020bf90: ffff21 l32r a2, 4020bf8c <system_uart_de_swap+0x34>
4020bf93: f00d ret.n
4020bf95: 000000 ill
4020bf98: e268 l32i.n a6, a2, 56
4020bf9a: 5d4000 excw
would then the location of the string 003ffe87, the value of 420bf8c ?
But that address is nowhere in the output of objdump and you mentioned hexdump.
Is this the way you suggested ? and in which file should I then be looking for the string ?
Herman
No. Its 3ffe87c4. The values are little endian.
I did it on some nodemcu firmware image and get:
3ffe9440
Thats a value in data ram.
objdump -h
Idx Name Size VMA LMA File off Algn
0 .irom0.text 00057bd2 40210000 40210000 0000cea0 2**4
CONTENTS, ALLOC, LOAD, CODE
1 .text 00007597 40100000 40100000 00005900 2**8
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000b68 3ffe8000 3ffe8000 000000e0 2**4
CONTENTS, ALLOC, LOAD, DATA
3 .rodata 00004be8 3ffe8b70 3ffe8b70 00000c50 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .bss 00009aa0 3ffed758 3ffed758 00005838 2**4
ALLOC
That means our data is in section
.rodata
3ffe9440 - 3ffe8b70 = 0x8d0
objdump -s
...
3ffe9440 302e392e 35000000 4a616e20 33302032 0.9.5...Jan 30 2
...
Cal