comparison dmd/FuncDeclaration.d @ 22:fd4acc376c45

Implemented object file output and linking on linux.
author Robert Clipsham <robert@octarineparrot.com>
date Thu, 08 Apr 2010 04:21:03 +0100
parents ddae60498573
children cab4c37afb89
comparison
equal deleted inserted replaced
21:26b9f97f6162 22:fd4acc376c45
2740 const(char)* libname = (global.params.symdebug) ? global.params.debuglibname : global.params.defaultlibname; 2740 const(char)* libname = (global.params.symdebug) ? global.params.debuglibname : global.params.defaultlibname;
2741 2741
2742 // Pull in RTL startup code 2742 // Pull in RTL startup code
2743 if (func.isMain()) 2743 if (func.isMain())
2744 { objextdef("_main"); 2744 { objextdef("_main");
2745 version (XXX) { ///TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 2745 version (POSIX) { ///TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS
2746 obj_ehsections(); // initialize exception handling sections 2746 obj_ehsections(); // initialize exception handling sections
2747 } else { 2747 } else {
2748 objextdef("__acrtused_con"); 2748 objextdef("__acrtused_con");
2749 } 2749 }
2750 obj_includelib(libname); 2750 obj_includelib(libname);
3082 { 3082 {
3083 Dsymbol ss = cast(Dsymbol)irs.deferToObj.data[i]; 3083 Dsymbol ss = cast(Dsymbol)irs.deferToObj.data[i];
3084 ss.toObjFile(0); 3084 ss.toObjFile(0);
3085 } 3085 }
3086 3086
3087 version (XXX) { ///TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 3087 version (POSIX) { ///TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS
3088 // A hack to get a pointer to this function put in the .dtors segment 3088 // A hack to get a pointer to this function put in the .dtors segment
3089 if (ident && ident.toChars() == "_STD") { 3089 if (ident && ident.toChars() == "_STD") {
3090 obj_staticdtor(s); 3090 obj_staticdtor(s);
3091 } 3091 }
3092 } 3092 }