This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Need help figuring out DLL load problem
On Sat, 2009-08-08 at 00:58 +0100, Dave Korn wrote:
> Yep, as you surmised; "(ty 0)" means the symbol type is
> IMAGE_SYM_DTYPE_NULL, as opposed to "(ty 20)" which is IMAGE_SYM_DTYPE_FUNCTION
> and is what you'd see on other PE platforms.
>
> BSF_FUNCTION is BSD's internal flag which denotes this. It should be being
> set in the assembler, at the same time as the symbol's type value, based on the
> .def directives emitted by the compiler in the generated assembler; these look like
>
> .def _ffi_call_SYSV; .scl 2; .type 32; .endef
>
> and it's the .type subdirective with value 32 that indicates a function.
>
> Check if your compiler is generating these directives, it's most likely that
> it isn't, since the code in the assembler to handle them is pretty generic and
> simple. In the Cygwin and MinGW compilers, this is handled by the function
> i386_pe_declare_function_type() in gcc/config/i386/winnt.c (note also how it
> needs to be called for undefined extern functions, see i386_pe_file_end().)
> Take a look in the cygming.h header file to see which of GCC's target macros
> need to be patched to emit a function .def directive by calling this code.
This lead me right to the cause of the problem, an error in the gcc
port.
Thanks !
Danny
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info