🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #953

Re: Linking asm into Mach-O project ?

#953
From: MW Ron
Date: Fri, 28 Jun 2002 02:07
30 lines
2280 bytes
In article <3D19F129.B549F3E0@arc-software.com>,
 Paul Russell <prussell@arc-software.com> wrote:

>I'm trying to integrate a chunk of gcc PowerPC assembler code into a CW
>8 Mach-O project. I've tried two approaches, neither of which seem to
>work. Has anyone else had more success than I have ?
>
>(i) fix the syntax (by hand !) and put the code into an inline asm {}
>function - this fails because CW complains that there aren't enough free
>registers (despite teh fact that I'm only using about 12 GPR's)
>
>(ii) assemble with gcc and try to link in the object file - the Mach-O
>Importer barfs with an error about an unsupported relocation type or
>some such
>
>Surely it shouldn't be this hard to link is some very straightforward
>asm functions, that already work with gcc ?

What linker are you using? the Apple GCC linker or Metrowerks Mach-O 
linker,  do you have a small example project (or code for a stationery 
project) that you can send that I can forward on.

Ron

-- 
  CodeWarrior, the ultimate development tools for Symbian OS
      http://www.metrowerks.com/products/symbian/d4

 Metrowerks, maker of CodeWarrior  -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Technical Details
Message-ID: <mwron-1E3F2D.22075227062002@enews.newsguy.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
References: <3D19F129.B549F3E0@arc-software.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,ca141578f4efb1df
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,ca141578f4efb1df
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2002-06-27 19:35:50 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
From: MW Ron <mwron@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: Linking asm into Mach-O project ?
Date: Thu, 27 Jun 2002 22:07:52 -0400
Organization: Metrowerks
Lines: 30
Message-ID: <mwron-1E3F2D.22075227062002@enews.newsguy.com>
References: <3D19F129.B549F3E0@arc-software.com>
NNTP-Posting-Host: p-448.newsdawg.com
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
        (%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
        @L/q,TjMd5+H{gASEPDR^$