nm: missing .rodata.*.str1.1 symbols
Nick Clifton
nickc@redhat.com
Thu Feb 23 16:20:00 GMT 2017
Hi Clément,
> Is it possible to find the information that /tmp/cc9j6Kh2.o fill 8bytes in the
> .rodata.str1.1 section somewhere else than in the map file ?
Well you could always look in object files concerned. For example if you add
"--save-temps" to your gcc command line then the object files will be created
in the current directory, rather than as temporary files. Then in the app.elf.map
file you should see something like:
.rodata.str1.1
0x00000000004005d0 0xb main.o
*fill* 0x00000000004005db 0x5
.rodata 0x00000000004005e0 0x17 main.o
0x00000000004005e0 str
.rodata.str1.1
0x00000000004005f7 0x8 test.o
So the first .rodata.str1.1 section is found in main.o and the second one in test.o.
You could then use readelf to look at the contents of the section. For example:
$ readelf -x .rodata.str1.1 test.o
Hex dump of section '.rodata.str1.1':
0x00000000 6d657267 653f3f00 merge??.
Which makes it pretty obvious that the contents are the string "merge??". Alternatively
you could just look in the assembler source files that will have been created by the
--save-temps command line option:
$ grep -A 3 -e str1.1 test.s
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "merge??"
.text
Cheers
Nick
More information about the Binutils
mailing list