Gregory McGarry added a comment - 04/Dec/08 11:23 PM The problem is caused by pcc not inserting "end of text segment" stab entries.
ld on OS X 10.5 seems to need them. At least the intel version does.
The following stab needs to be inserted at the end of the text segment:
.stabs "",100,0,0,Letext0
Letext0:
Additionally, gcc has a nice feature of trapping signals from ld:
collect2: ld terminated with signal 10 [Bus error]
It would be nice to have this feature in pcc - it makes it easier to isolate problems quickly.