[U-Boot] timer_read_counter() __weak keyword link error on arm
yuanlinyu
cugyly at 163.com
Mon Nov 2 01:43:07 CET 2015
hi rob,
i found you did the below changes,
-extern unsigned long timer_read_counter(void);
+extern unsigned long __weak timer_read_counter(void);
but it cause below link error when CONFIG_SYS_TIMER_COUNTER is not defined.
mcerto-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail elf32-arm.c:7698
arm-comcerto-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-comcerto-linux-gnueabi-ld.bfd: final link failed: Invalid operation
but this error message is difficult to find the root cause(at least for me).
after remove the __weak keyword, i will find the error at comiple time.
lib/built-in.o: In function `get_ticks':
../u-boot-2015.10/lib/time.c:42: undefined reference to `timer_read_counter'
do it realy need to add __weak?
thanks
More information about the U-Boot
mailing list