btashton edited a comment on issue #3737:
URL: 
https://github.com/apache/incubator-nuttx/issues/3737#issuecomment-846638509


   Ok I was able to get this to work, but there seems to be an issue with how 
we identify symbols as being thumb functions in ldnxflat
   This fails because `st_info=0x18` so it is only annotated as `STT_FUNC`. 
   ```
   if ((((elf_symbol_type *)rel_sym)->internal_elf_sym.st_info & 0x0f) == 
STT_ARM_TFUNC)
   ```
   
   When I hacked these checks to just look for `STT_FUNC`,  I was able to make 
the test pass.  I am digging in to try and understand why the symbols do not 
have `STT_ARM_TFUNC`.
   
   ```
   ABCDF
   Registering romdisk
   Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
   
   ****************************************************************************
   * Executing errno
   ****************************************************************************
   
   Wait a bit for test completion
   Hello, World on stdout
   Hello, World on stderr
   We failed to open "aflav-sautga-ay!" errno is 2
   
   ****************************************************************************
   * Executing hello
   ****************************************************************************
   
   Wait a bit for test completion
   Getting ready to say "Hello, world"
   
   Hello, world!
   It has been said.
   
   argc = 1
   argv = 0x0x20005130
   argv[0]      = (0x0x20005138) "<noname>"
   argv[1]      = 0x0
   Goodbye, world!
   
   ****************************************************************************
   * Executing struct
   ****************************************************************************
   
   Wait a bit for test completion
   Calling getstruct()
   getstruct returned 0x20004db0
     n = 42 (vs 42) PASS
     pn = 0x20004da4 (vs 0x20004da4) PASS
    *pn = 87 (vs 87) PASS
     ps = 0xdc50 (vs 0xdc50) PASS
     ps->n = 117 (vs 117) PASS
     pf = 0xdae1 (vs 0xdae1) PASS
   Calling mystruct->pf()
   In dummyfunc() -- PASS
   Exit-ing
   End-of-Test.. Exit-ing
   ```


-- 
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:
[email protected]


Reply via email to