Hi all,

Thanks for the feedback.

I'm looking at option (2), modifying
`libs/libc/symtab/symtab_find(ordered)?byname.c` to strip a leading
underscore if a new Kconfig setting (SYMTAB_DECORATED in binfmt/Kconfig) is
set. I considered modifying the ELF loader, but the kernel module system
needs the same adjustment when making the same calls.

The NXFLAT loader 'benefits' too, but I think toolchains that prefix
underscores and toolchains that support the NXFLAT toolchain don't overlap.

-- 
bje

On Mon, Mar 15, 2021 at 12:40 AM Gregory Nutt <spudan...@gmail.com> wrote:

> > Which I think is insufficient.  Probably some of the support was removed?
> >
> No.. It is just that there was no support for loadable modules for those
> older Cygwin toolchains.  The underscore has not been used with Cygwin
> since around 2015 so I think would be safe to just remove the
> CONFIG_SIM_CYGWIN_DECORATED configuration.
>
> In your case, I think you have two options:
>
> 1) Write a tool to rename all of the symbols in the library to remove
> the leading underscore (using objcopy --redefine-syms), or
>
> 2) Modify the elf loader[s] to conditionally prepend the '_' character
> before looking up the symbol by name.
>
>

Reply via email to