DJGPP Incompatible with GAS !?

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
Ben Hsu

DJGPP Incompatible with GAS !?

Post by Ben Hsu »

Hello,
I've wrote a library in assembly using GAS,
then I tried to compile it with "-ffreestanding"
with a C file. Both using source file to compile.
However, only the first few functions in in
assembly code were read and the rest were told to
be undefined refrences.
The situation is very tricky that even Borland's
Turbo C++ fall to this trap. Is this the stuff
on the buttom of the "Mixing C and Assembly" page?
For that sentence describing 3 methods are hard
to understand => conplex sentence very hard to read.

Any answer is welcome, thank you.
Chase

RE:DJGPP Incompatible with GAS !?

Post by Chase »

>On 2001-02-11 19:51:43, Ben Hsu wrote:
>Hello,
> I've wrote a library in assembly using GAS,
>then I tried to compile it with "-ffreestanding"
>with a C file. Both using source file to compile.
>However, only the first few functions in in
>assembly code were read and the rest were told to
>be undefined refrences.

I don't use gas myself but it sounds like your asm
function names don't match to the functions your trying
to call from your C code.

> The situation is very tricky that even Borland's
>Turbo C++ fall to this trap. Is this the stuff
>on the buttom of the "Mixing C and Assembly" page?
>For that sentence describing 3 methods are hard
>to understand => conplex sentence very hard to read.

That paragraph is about string constant placement within
C code.

Try looking at some examples of using gas with djgpp:
http://www.castle.net/~avly/djasm.html
http://www.delorie.com/djgpp/doc/ug/asm/calling.html
Post Reply