David, On 20 Aug 2010, at 12:33, David Matthews wrote:
> Rob Arthan wrote: >>> Matthew, >>> That looks suspiciously like the "execute bit" problem. Did you include >>> -segprot POLY rwx rwx >>> to the linker? See the last line of (the updated) >>> http://www.polyml.org/FAQ.html#standalone >> On that point, I recall having some problems caused by using "cc" rather >> than "c++". Was that an illusion? > > I wouldn't have thought that using "cc" rather than "c++" would have an > effect on the Bus Error and the fix for it. It would probably simplify > finding the C++ libraries. > > To just explain: the Bus Error arises because the linker has removed execute > permission from the segment containing the code produced by Poly/ML and > exported. It is actually exported with read, write and execute permissions > set in the Mach-O header but for some reason the Mac OS X linker removes the > execute permission unless it's explicitly set with the segprot option. This > isn't a problem in 32-bit mode which doesn't seem to enforce execute > permission but causes a Bus Error in 64-bit mode. It would probably be > better if Poly/ML exported the code as a read/execute "text" segment but the > current RTS needs write access in some circumstances. Thanks for the clarification. In fact, I didn't explain myself very well. What I meant was that as I have had problems of the sort linking Poly/ML programs because I used cc rather than c++, I thought it might be better to use c++ in the documentation throughout. Regards, Rob.
_______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml