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

   
   @xiaoxiang781216, I tried locally with configs based on `rv-virt:nsbi` and 
`qemu-armv7a:knsh` with below change:
   
   ```sh
   $ diff ...
   44c44
   < CONFIG_BINFMT_ELF_EXECUTABLE=y
   ---
   > CONFIG_BINFMT_ELF_RELOCATABLE=y
   
   ```
   Then I noticed that it has `-e _start` option:
   
   ```make
   LD:  /tmp/apps/bin/hello
   riscv64-unknown-elf-ld -r --oformat elf32-littleriscv -r -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
   ```
   Thus the result ELFs can run.
   
   Do you know any other scenarios that worth a check? I can check them as well.
   


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