site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=dnEVNPNtx+JYyjPt1bR72sD76KKs9Tnwe/2VrAQNmp8=; b=TEcSrIPXVyumuyuSqctdFhoElp3dDgIx/7fnD/6fu3uH+4oLmN9QqULTgl+Va04XBO mcd3oUyzV32ZYZoz50oLAJE2YPWD5gE1HnBfQC5Ziav6lUbV9J8THMhC1mS8o/xTjWNL DrXUMDOIIhywh0PhG/i4ABqW7EhowO6ylLVkk= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=HDQghpv6SShozrisdyzbzlN2Q1OsEeYdEdUu7sHfks8hz1fIH2eK67VIkfjb4Q0ZYH xjKv2rLCOCvPyJQqttaJHmv14EJBm0qd8GCOAZ5EFVSkIJ479SqJjOistuhFCyUxagZ3 ocUkPIVp4ouC+s2BgdIMaLQxl3W77M/s3Qc88= Terry, On Jan 9, 2009, at 8:03 PM, Terry Lambert wrote: Section sectname __text segname __TEXT addr 0x00001308 size 0x00000039 offset 776 align 2^0 (1) Yes, an oversight. I'll add it later, thanks for pointing it out. Will investigate. Can you give me an example of such C code? Yes, I decided not to bother with it. Thanks, Joel -- http://wagerlabs.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This alignment is incorrect; the linker would have specified the correct alignment. Yes, I decided not to bother with the "correct" alignment. The app runs so I kept it. You do not appear to have a section __cstring, which is where you would keep the static string you passed to printf, since it is a static string, which by default should not be a writeable symbol. I also need writable TEXT segments for self-modifying code, which I haven't enabled here. You do not have an __unwind_info section; however, since that's used to support C++, ObjC, etc. exception handling, and since you aren't using the linker, there's no way to cause you code to be linked with this sort of library, that's probably an acceptable omission for you (but maybe not for your customers). You are missing the __dyld __DATA section which would be normally included as a result of linking with the linker. This means that interfaces which did not use it would work, but interfaces which do use it (for example, code which returns pointers to static data areas), would crash. Better yet, could you explain why such does uses the __dylb __DATA section? You are missing an LC_UUID. I assume you very much understand the difference between a linker and a loader; the ld command can act both as a linker and a loader, but by preventing it acting as a linker, you are cutting yourself off from linking against libraries other than the ones you already know about. I'm not sure what you mean. I thought I can always load other shared libraries using dlopen and friends. Is that not so? Again, the reason I'm doing this is that I cannot use the linker. I don't use a C compiler or an assembler either. This is Forth (as in OpenFirmware) and I'm building the image in memory and dumping it to disk... On Linux! P.S. I'm looking to switch away from system calls once I have cross- compiled. This email sent to site_archiver@lists.apple.com