OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:28 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DJGPP Incompatible with GAS !?
PostPosted: Sun Feb 11, 2001 12:00 am 
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.


Top
  
 
 Post subject: RE:DJGPP Incompatible with GAS !?
PostPosted: Mon Feb 12, 2001 12:00 am 
>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


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], thewrongchristian and 83 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group