objcopy -I binary -O elf32-i386 -B i386 your_bin_file your_bin_file.o
Then you can use nm to check your_bin_file.o
01000000 D _binary_your_bin_file_end
01000000 A _binary_your_bin_file_size
00000000 D _binary_your_bin_file_start
Use this in your code
extern char _binary_your_bin_file_end[];
extern char _binary_your_bin_file_size[];
extern char _binary_your_bin_file_start[];
我的小樹
16 年前