Reputation: 677
I have tried both "arm-none-eabi-gcc" and "arm-elf-gcc" installed via MacPorts, but every time I compile, I get this warning.
ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000
I am using the "-T" flag and specifying my own linker file which is as follows.
SECTIONS {
. = 0x00000000;
.text : { * (vectors); * (.text); }
.rodata : { * (.rodata); }
text_end = .;
. = 0xA4000000;
.data : AT (text_end) { * (.data); }
.bss : { * (.bss); }
}
NM dumps this.
00000000 t reset
00000004 t undefined
00000008 t swi
0000000c t prefetch_abort
00000010 t data_abort
00000014 t reserved
00000018 t interrupt_request
0000001c t fiq
00000020 t irq
00000024 T init
00000038 T main
0000004c A text_end
00008024 t entry
0000804c T __data_start
00010028 A __bss_end__
00010028 A __bss_start
00010028 A __bss_start__
00010028 A __end__
00010028 A _bss_end__
00010028 A _edata
00010028 A _end
00080000 N _stack
Upvotes: 2
Views: 6900
Reputation: 1316
Linker is giving you a warning because it is not able to find a _start
symbol in compiled code. And your current linker configuration is expecting that there should be such symbol defined somewhere in the code.
So you either have solution to manually define your entry point (i.e. reset) by consulting the compiler/linker user manual and understanding the usage of -e
linker flag or really define a symbol named _start
in some of your code.
Upvotes: 2