yf13 commented on PR #15527:
URL: https://github.com/apache/nuttx/pull/15527#issuecomment-2589405769

   @anjiahao1  and @lupyuen , I have a question: now that `rv-virt` has 
`boards/gnu-elf.ld`, why updating of  `modlib/gnu-elf.ld` can affect its app 
linking behavior?
   
   It turned out that currently `modlib/gnu-elf.ld` is also used for apps ELF 
linking even if board specific one exists:
   
   ```
   riscv64-unknown-elf-ld -e main --oformat elf32-littleriscv -T 
/tmp/nuttx/libs/libc/modlib/gnu-elf.ld -e __start -Bstatic 
-T/tmp/apps/import/scripts/gnu-elf.ld  -L/tmp/apps/import/libs -L 
"/usr/lib/gcc/riscv64-unknown-elf/10.2.0/rv32imafdc/ilp32d" 
/tmp/apps/import/startup/crt0.o  hello_main.c.tmp.apps.examples.hello.o 
--start-group -lmm -lc -lproxies -lgcc /tmp/apps/libapps.a 
/usr/lib/gcc/riscv64-unknown-elf/10.2.0/rv32imafdc/ilp32d/libgcc.a --end-group 
-o  /tmp/apps/bin/hello
   ```
   
   My undertsanding is that `mkexport.sh` also needs some fix so that not 
referring to `modlib/gnu-elf.ld`  when linking app elfs?
   
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to