No, it seem that mksymtab forget to handle the case you described.

This was handled in the past, but I forget where the logic was. Let me look around a bit.

... after a bit ...

Googling, I find that there was some handling in the simulator for Cygwin.  Some older tool toolchains did prepend the underscore character to the symbol name.  Look at CONFIG_SIM_CYGWIN_DECORATED.

     46 config SIM_CYGWIN_DECORATED
     47         bool "Decorated Cygwin names"
     48         default n
     49         depends on WINDOWS_CYGWIN
     50         ---help---
     51                 Older versions of Cygwin tools decorated C
   symbol names by adding an
     52                 underscore to the beginning of the symbol
   name.  Newer versions of
     53                 Cygwin do not seem to do this.
     54
     55                 How do you know if you need this option? You
   could look at the generated
     56                 symbol tables to see if there are underscore
   characters at the beginning
     57                 of the symbol names.  Or, if you need this
   option, the simulation will not
     58                 run:  It will crash early, probably in some
   function due to the failure to
     59                 allocate memory.

Currently that appears only at:

 * arch/sim/Kconfig:config SIM_CYGWIN_DECORATED
 * arch/sim/src/nuttx-names.in: (defined(CONFIG_HOST_WINDOWS) &&
   defined(CONFIG_SIM_CYGWIN_DECORATED))
 * boards/sim/sim/README.txt: CONFIG_SIM_CYGWIN_DECORATED=n
 * boards/sim/sim/README.txt:    do not seem to do this.  Deselecting
   CONFIG_SIM_CYGWIN_DECORATED will

Which I think is insufficient.  Probably some of the support was removed?

I was thinking that there was a similar underscore issue with older SDCC toolchains, but I can't find anything now (except some references in arch/z80/src/Makefile.sdccw).


Reply via email to