• 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
-weak_framework entry point testing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-weak_framework entry point testing?


  • Subject: -weak_framework entry point testing?
  • From: Rich Siegel <email@hidden>
  • Date: Mon, 27 Jun 2005 12:33:34 -0400

I have some existing code that worked fine using Xcode 2.0 and GCC 3.3,
which crashes when built with Xcode 2.1 and GCC 4.0. In particular, I'm
testing an entry point in a weak-linked framework to make sure it's
available before I call it:

    #include    <StuffIt/StuffIt.h>

    if (NULL != StuffItEngineLibraryAvailable)
    {
        /*...*/
    }

When I remove /Library/Frameworks/StuffIt.framework/ , the test crashes.
Disassembly in the debugger shows:

    bl  0x71C420 <dyld_stub_StuffItEngineLibraryAvailable>

The function at that address is:

0x0071c420 <dyld_stub_StuffItEngineLibraryAvailable+0>: lis r11,143
0x0071c424 <dyld_stub_StuffItEngineLibraryAvailable+4>: lwzu    r12,548(r11)
0x0071c428 <dyld_stub_StuffItEngineLibraryAvailable+8>: mtctr   r12
0x0071c42c <dyld_stub_StuffItEngineLibraryAvailable+12>:    bctr

If the symbol is in fact unresolved, then obviously the bctr will crash,
but I'm wondering why that suddenly stopped working, and why this isn't
a problem with identical source code built using GCC 3.3. Any advice
would be much appreciated.

Thanks,

R.
--
Rich Siegel                                 Bare Bones Software, Inc.
<email@hidden>                      <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.
 _______________________________________________
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

  • Prev by Date: Re: XCode 2.0: what happened to long long?
  • Next by Date: Re: [Fwd: How to conditionally run a script based on build configuration]
  • Previous by thread: Re: Info.plist
  • Next by thread: Subversion and Xcode project
  • Index(es):
    • Date
    • Thread