u_int32_t ip6_address[1][4] = { {0x00000001, 0x0, 0x0, 0x12345678} };
在x86 PC CPU上运行时,以上内容如何看待RAM的十六进制转储?
最佳答案
有时,最简单的外观是:
$ cat example.c
#include <stdint.h>
uint32_t ip6_address[1][4] = { {0x00000001, 0x0, 0x0, 0x12345678} };
$ make example.o
clang -Wall -Wextra -pedantic -c -o example.o example.c
$ otool -d example.o
example.o:
(__DATA,__data) section
0000000000000000 01 00 00 00 00 00 00 00 00 00 00 00 78 56 34 12
您可以为第二个示例执行类似的操作。