• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: thin linking: "file is not of required architecture"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thin linking: "file is not of required architecture"


  • Subject: Re: thin linking: "file is not of required architecture"
  • From: Steve Checkoway <email@hidden>
  • Date: Mon, 21 Apr 2008 14:27:39 -0700


On Apr 21, 2008, at 9:08 AM, Sherm Pendley wrote:
Calling conventions are a mix of hardware and language specification.

The hardware specifies how the stack frame is arranged, how parameters are passed, and return values returned.

Right.

But, symbol naming conventions are left up to language standards - C+ +, for example, "mangles" method and function names to include the type signature, so as to turn overloaded methods into unique names that the linker can handle. Objective-C does something similar to create IMP function names from methods, adding a prefix and swapping _s for :s.


I don't think that I'd call name mangling a calling convention, but maybe that's just semantics.

On Apr 21, 2008, at 9:43 AM, Simon Wilson wrote:

> A function call convention is generally something that the hardware specifies


Calling convention is compiler-defined rather than hardware defined. For example, Pascal and C implement opposite calling conventions with respect to:

a) parameter order on the stack (left-to-right or right-to-left)

I don't know about Pascal, but the C99 standard does not even contain the word "stack" in the document so I'm pretty sure it doesn't specify parameter order.


b) whether caller or callee is responsible for popping arguments off stack after function return

True.

Microsoft's 16 bit compilers used the Pascal calling convention for the Win16 API even though the predominant language for Win16 programming was C!

I seem to recall a lot of the Mac OS toolbox having functions declared pascal, although gcc doesn't seem to handle it as a keyword.


Even today, all Win32 APIs are declared using the __stdcall (derivative of the Pascal convention) while the C/C++ compiler generates __cdecl by default. This is irrespective of hardware platform the compiler is targeting.

I'm still not clear what was meant by BSD or ANSI calling conventions.

--
Steve Checkoway





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: thin linking: "file is not of required architecture"
      • From: Jeffrey Oleander <email@hidden>
References: 
 >thin linking: "file is not of required architecture" (From: Philip Hölzenspies <email@hidden>)
 >Re: thin linking: "file is not of required architecture" (From: Chris Espinosa <email@hidden>)
 >Re: thin linking: "file is not of required architecture" (From: Philip Hölzenspies <email@hidden>)
 >Re: thin linking: "file is not of required architecture" (From: Steve Checkoway <email@hidden>)
 >Re: thin linking: "file is not of required architecture" (From: "Sherm Pendley" <email@hidden>)

  • Prev by Date: Re: Preprocessor, problem
  • Next by Date: Re: Debugging an arbitrary application
  • Previous by thread: Re: thin linking: "file is not of required architecture"
  • Next by thread: Re: thin linking: "file is not of required architecture"
  • Index(es):
    • Date
    • Thread