AlexanderVasiljev commented on pull request #3836: URL: https://github.com/apache/incubator-nuttx/pull/3836#issuecomment-856651406
Following configurations have multiple definition of `__start' > imxrt1060-evk/nshocram > imxrt1064-evk/nshocram > raspberrypi-pico/nshsram It is due to they insert object files in ld scripts and then pass them to gcc. ``` SECTIONS { .text : { _stext = ABSOLUTE(.); rp2040_start.o(.text) . = ALIGN(256); *(.vectors) *(.text .text.*) ``` ``` .flashxip : ALIGN(4) { FILL(0xff) /* Order matters */ imxrt_start.o(.text) imxrt_boot.o(.text) ``` Log ``` Building NuttX... /tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: imxrt_start.o: in function `__start': imxrt_start.c:(.text+0x0): multiple definition of `__start'; /github/workspace/sources/nuttx/staging/libarch.a(imxrt_start.o):imxrt_start.c:(.text+0x0): first defined here /tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /github/workspace/sources/nuttx/arch/arm/src/board/imxrt_boot.o: in function `imxrt_ocram_initialize': imxrt_boot.c:(.text+0x0): multiple definition of `imxrt_ocram_initialize'; /github/workspace/sources/nuttx/arch/arm/src/board/libboard.a(imxrt_boot.o):imxrt_boot.c:(.text+0x0): first defined here /tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /github/workspace/sources/nuttx/arch/arm/src/board/imxrt_boot.o: in function `imxrt_boardinitialize': imxrt_boot.c:(.text+0x44): multiple definition of `imxrt_boardinitialize'; /github/workspace/sources/nuttx/arch/arm/src/board/libboard.a(imxrt_boot.o):imxrt_boot.c:(.text+0x44): first defined here ``` It seems that LD can deal with such situation. Gcc not. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org