I am receiving the warning after I have added -nostdlib
to the linker flags.
tricore/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to c0000000
The linking is done as follows:
$(OUTDIR)/$(BINARY_NAME).elf: $(OUTDIR) $(OBJ)
$(TRICORE_TOOLS)/bin/tricore-gcc -Tld/iRAM.ld -Wl,--no-warn-flags -Wl,
--gc-sections -Wl,-n -nostdlib -o $@ $(OBJ) C:\OpenSSL-Win32\lib\MinGW
\libssl-1_1.a C:\OpenSSL-Win32\lib\MinGW\libcrypto-1_1.a
I read that -nostdlib
results in not using the standard system startup files or libraries when linking.
The file ld/iRAM.ld looks as follows, and as far as i understand, it contains the _start symbol and it is passed to the linker:
ENTRY(_start)
/*
* Global
*/
/*Program Flash Memory (PFLASH0)*/
__PMU_PFLASH0_BEGIN = 0x80000000;
__PMU_PFLASH0_SIZE = 2M;
/*Program Flash Memory (PFLASH1)*/
........
........
SECTIONS
{
/*Code-Sections*/
/*
* Startup code for TriCore
*/
.startup_code :
{
PROVIDE(__startup_code_start = .);
........
}
.....
}
I have read, that if I pass the -nostdlib
flag to the linker, I need to provide the startup code to it too. Does anyone know what I am doing wrong here?