Hallo Community!
Dieser Thread dient ausschließlich als Informationsquelle, sollte jemand
hier auf das gleiche Problem stoßen.
Seit GNU binutils Version 2.44 und höher, wird bei Assemblerquelldateien
bei Funktionen die Assemblerdirektive ".type symbol_name, %function"
benötigt. Wenn diese Direktive fehlt, dann schlägt das Linken fehl.
Beispielausgabe wenn zum Beispiel U-Boot kompiliert wird:
1 | $ make
|
2 | [...]
|
3 | LD u-boot
|
4 | arm-none-eabi-ld.bfd: warning: -z norelro ignored
|
5 | arm-none-eabi-ld.bfd: arch/arm/cpu/armv7m/start.o(c_runtime_cpu_setup): Unknown destination type (ARM/Thumb) in arch/arm/lib/crt0.o
|
6 | arch/arm/lib/crt0.o: in function `_main':
|
7 | /home/jk/Projects/U-Boot/src/arch/arm/lib/crt0.S:170:(.text+0x44): dangerous relocation: unsupported relocation
|
8 | make[1]: *** [/home/jk/Projects/U-Boot/src/Makefile:1824: u-boot] Error 1
|
9 | make[1]: Leaving directory '/home/jk/Projects/U-Boot/build'
|
10 | make: *** [Makefile:177: sub-make] Error 2
|
11 | $
|
(Bei der U-Boot Mailingliste hab ich das Problem gemeldet und auf Wunsch
eines Entwicklers heute auch einen Patch veröffentlicht.)