public inbox for c++-embedded@sourceware.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@btree.com>
To: c++-embedded@cygnus.com, choward@intellistor.com
Cc: crossgcc@cygnus.com
Subject: Re: gcc vs g++ and linking with as
Date: Thu, 25 Jun 1998 09:21:00 -0000	[thread overview]
Message-ID: <s5923122.007@btree.com> (raw)

This is the name mangling that g++ uses to resolve overloaded functions.
To prevent this, declare the assembly functions as extern "C" in the
C++ code.  For example:

   extern "C" asm_fn();

HTH.  Regards,

     -=Dave

>>> Chris Howard <choward@intellistor.com> 06/25/98 10:29AM >>>
binutils 2.9
gcc/g++ 2.8.0

Host Sun Sparc Solaris 2.5
Target Motorola Coldfire (-m5200)  a.out object format

---

Not using stdlib  (-nostdlib)

We have some code in assembler, and some in C.
Compiling with as,gcc and linking with ld works fine.
Compiling with as,g++ and linking with ld does not work,
  undefined symbols for those things written in assembler.

The .o files output from g++ compilation have exported symbols that
end in '__Fv' whereas the assembler output .o files don't have
'__Fv' on the symbols.  Is that the problem?  Is there
some way to make it work?  What is __Fv?


An alternative might be to put the assembly code in
C/C++ wrapper functions.  Any hints/comments that
would be appreciated also.  


-- 
Chris Howard            Fujitsu Computer Products of America
                                          Longmont, Colorado
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             !
                                   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

             reply	other threads:[~1998-06-25  9:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-25  9:21 Dave Hansen [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-06-25 11:36 Gary Mussar
1998-06-25 11:26 Gary Mussar
     [not found] <s5923122.008@btree.com>
1998-06-25 10:53 ` Chris Howard
1998-06-25  8:32 Chris Howard
1998-06-25 20:20 ` C. M. Heard/VVNET, Inc.
1998-06-25 23:03 ` Stephen Williams
1998-06-26  0:59 ` Robert J. Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5923122.007@btree.com \
    --to=dave.hansen@btree.com \
    --cc=c++-embedded@cygnus.com \
    --cc=choward@intellistor.com \
    --cc=crossgcc@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).