|
|||||
| | |||||
Avec gcc, nous transformons ces instructions en
fichier objet, puis la commande nm en affiche le
contenu :
$ gcc -c hello.c -o hello.o
$ ls
hello.c hello.o
$ nm hello.o
00000004 C empty
00000000 t gcc2_compiled.
00000000 T main
U printf
00000000 D world
La commande nm affiche tous les symboles contenus
dans un fichier objet. Pour chaque symbole, nm
donne :
.bss ; UNINITIALIZED DATA SEGMENT.data ;INITIALIZED DATA SECTIONempty est defini mais pas encore
initialise. DEFINED BUT NOT INITIALIZED. S'il ne l'est nulle part, son type changera
alors en B ;.text
(code) ; NORMAL DEFINITION IN THE CODE SECTION
Il existe de nombreux autres types décrits dans la page
info nm ;
| Leave a Reply |