This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nm: missing .rodata.*.str1.1 symbols

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
file you should see something like:

                0x00000000004005d0        0xb main.o
 *fill*         0x00000000004005db        0x5 
 .rodata        0x00000000004005e0       0x17 main.o
                0x00000000004005e0                str
                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
	.string	"merge??"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]