1、用arm-linux-gcc 4.3.2 编译 u-boot-1.1.6 出现 In function `__aeabi_ldiv0':
(.text+0x8): undefined reference to `raise'...
编译u-boot-1.1.6 使用 arm-linux-gcc 3.4.5即可。
其他相关阅读
1) http://www.arm9home.net/simple/index.php?t1960.html
2) http://kongweile.iteye.com/blog/1576113 (ABI与EABI)
2、#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8")
这个声明告诉编译器使用寄存器r8来存储gd_t类型的指针gd,即这个定义声明了一个指针,并且指明了它的存储位置。
register表示变量放在机器的寄存器
volatile用于指定变量的值可以由外部过程异步修改
并且这个指针在start_armboot()(board.c)中被初始化:
/* Pointer is writable since we allocated a register for it */
gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t));
这样,gd就指向的一个可用的内存地址了。
原文:http://hi.baidu.com/rwen2012/item/783c47cf40d23427e80f2e51
3、__asm__ __volatile__("": : :"memory");
这是GCC内嵌汇编,详见:http://topic.csdn.net/u/20090521/11/35609357-57b9-4c7c-af6a-04a76eef49a3.html