Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7673141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:26:36+00:00 2026-05-31T16:26:36+00:00

On MacOS I’m seeing a stack that looks like so (at the very top

  • 0

On MacOS I’m seeing a stack that looks like so (at the very top of the stack is a trap the code in question, but I want to understand how I get there)

(gdb) where
...
#4  0x0000000112fdefc8 in appLibInit::appLibInit ()
#5  0x0000000112fdef71 in __sti__$E ()
#6  0x00007fff5fc112f7 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#7  0x00007fff5fc0d20c in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#8  0x00007fff5fc0d1b0 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#9  0x00007fff5fc0d1b0 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#10 0x00007fff5fc0d1b0 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#11 0x00007fff5fc0d2f4 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#12 0x00007fff5fc038b4 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#13 0x00007fff5fc06ea1 in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#14 0x00007fff5fc01695 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#15 0x00007fff5fc0103a in __dyld__dyld_start ()
#16 0x0000000100000000 in ?? ()
#17 0x0000000000000001 in ?? ()

The function appLibInit::appLibInit is a C++ constructor for a global object in our code, so I’m guessing I’m in pre-main code of some sort, probably processing all the shared libraries that are linked to (oddly the code in question is not something that we expect we are linked to, unless it is being dragged in by something else).

The mac c++filt doesn’t seem to decode these __dyld prefixed symbols.

Does anybody know of some docs that describe the MacOS process startup sequence, that would possibly give me a bit more of a clue what’s going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:26:38+00:00Added an answer on May 31, 2026 at 4:26 pm

    The source to dyld is available online:

    http://www.opensource.apple.com/source/dyld/

    You can decode the mangled symbol names by simply removing the __dyld prefix. The prefix is presumably added to prevent conflicts with user code that happens to define the same C++ functions (for instance, if you’re compiling parts of dyld yourself).

    What you’re looking at, more generally, is library load and initialization. A dynamic library can declare that a function should be run when it is loaded; it looks like that’s happening here for your appLibInit::appLibInit(). (This can end up happening before main(), if the library is loaded by the main binary.)

    One way this might be happening in C++ would be if you declare any objects globally which have constructors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My .app packages looks like this: MyApp.app/ Contents/ MacOS/ MyApp libA.dylib libB.dylib libC.dylib PlugIns/
I want to compile C++ code on MacOS X, using the g++ compiler. How
I'm trying to build a framework for MacOS in Xcode 3. It looks like
Is there any 256 color xterm for MacOS x? Like the one described below?
.dylib is the dynamic library extension on macOS, but it's never been clear to
Suppose I have two branches of a project IMClient-MacOS and IMClient-Windows, and their code
Is there any MacOS virtual machine that can run on PC? Is there any
On MacOS with gcc4.2 should the following code create a new file if none
I am using MacOS X 10.5 and it appears to me that the java
On MacOS X, you can write a Spotlight Importer so that your documents and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.