how objdump handles global variables
问题 I have made the following dummy code for testing /tmp/test.c contains the following: #include "test.h" #include <stdio.h> #include <stdlib.h> struct s* p; unsigned char *c; void main(int argc, char ** argv) { memset(c, 0, 10); p->a = 10; p->b = 20; } /tmp/test.h contains the following: struct s { int a; int b; }; I compile and run objdump as follows: cd /tmp gcc -c test.c -o test.o objdump -gdsMIntel test.o I get the following output: test.o: file format elf32-i386 Contents of section .text: