I've come across a bug in dyld, when a C++ program is linked with the
-s option.
The error message is:
dyld: lazy symbol binding failed: lazy pointer not found
dyld: lazy pointer not found
Trace/BPT trap
It must be a 'known problem' because have seen several references to
it on the internet (see below), but none seem to suggest that there is
a fix from Apple in the pipeline. Has anyone got any definitive
information on this or should I submit a bug report to Apple?
Peter
More info:
An example, minimal program:
// example.cc
struct Object
{
virtual void func(void) {}
virtual ~Object() {};
};
int main()
{
Object o;
return 0;
}
// End
Steps to reproduce:
1. compile with g++ -s example.cc -o example
2. run with ./example
3. Error message appears
It does not appear:
1. If you omit the -s option
2. If you use -Wl,-x instead of -s
3. If you omit the -s option and subsequently use strip(1)
My system:
Mac OS X 10.4.7
iMac 1.83GHz Intel Core Due
gcc version 4.0.1 (Apple Computer, Inc. build 5363)