GCC and AS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kernel Panic

GCC and AS

Post 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?
Kernel Panic

Re: GCC and AS

Post 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? =)
K.J.

Re: GCC and AS

Post 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.
Tim

Re: GCC and AS

Post 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.
Jeroen Jacobs

Re: GCC and AS

Post 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
Kernel Panic

Re: GCC and AS

Post 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..
Post Reply