Page 1 of 1

GCC and AS

Posted: Wed Feb 27, 2002 11:25 am
by Kernel Panic
Hi!

I've asked this at several places, but noone seems to know a definite answer.

When trying to link an executable against a shared library I get the following message from LD (the DJGPP port):
Warning: c:/gnu/bin/ld.exe: warning: type and size of dynamic symbol `_fsdrv_init' are not defined

How do I define the "type and size" of that symbol? It's a C function (not in asm). No type or size is output by GCC in the assembler file. Enabling debugging info doesn't solve this problem..

I'm using GCC 3.0.3, binutils 2.11.2 (primary target coff-go32, currently i386-elf32), if that matters.

Any ideas of what could be wrong?

Re: GCC and AS

Posted: Fri Mar 01, 2002 1:01 am
by Kernel Panic
Yeah.. I shouldn't have expected to get help here..  :'( <sigh> Guys at gnu.gcc.help seem to be ignoring me at all..  :) Has really noone come across this kind of problem? That GCC, when cross-compiling from DJGPP to ELF, doesn't output the symbols' type and size for functions. I have to do it with ugly macros. I wonder how this is accomplished under Unix.. GCC under my FreeBSD seems to work, though.. Rebuilding GCC 3.0.4 with itself (under DJGPP) gives me errrorrrrs..

Does anyone know at least where I can ask this? =)

Re: GCC and AS

Posted: Fri Mar 01, 2002 5:34 am
by K.J.
Try and find a C/C++ newsgroup. Go over to:
http://groups.google.com

And start with comp then lang and then look for a C/C++ group.

Hope that helps you,
K.J.

Re: GCC and AS

Posted: Mon Mar 04, 2002 1:46 am
by Tim
And start with comp then lang and then look for a C/C++ group.
Do not do this, because it will lead you places like comp.lang.c and comp.lang.c++ who will, rightly, flame you for posting compiler-specific questions.

This problem is specific to gcc, or, more likely, DJGPP; it is almost completely unrelated to the C language.

Re: GCC and AS

Posted: Tue Mar 05, 2002 1:58 am
by Jeroen Jacobs
Hi,
When trying to link an executable against a shared library I get the following message from LD (the DJGPP port):
Warning: c:/gnu/bin/ld.exe: warning: type and size of dynamic symbol `_fsdrv_init' are not defined
I think that DJGPP does not support shared libraries... (although I'm not 100% sure).

PS : You can't use shared libraries in a kernel

Jeroen Jacobs

Re: GCC and AS

Posted: Tue Mar 05, 2002 3:32 am
by Kernel Panic
I think that DJGPP does not support shared libraries... (although I'm not 100% sure).
DJGPP doesn't, but I'm not going to run the kernel using DJGPP =) . I've recompiled binutils and added support for ELF.
PS : You can't use shared libraries in a kernel
Why?? My loader links (at least, will link) the kernel and a couple of boot-time drivers dynamically, the latter two being the shared libraries.

..It's not an issue of DJGPP itself, but rather of GCC being misconfigured, or something like that.. I guess, I should rebuild it some day..