X-Spam-Check-By: sourceware.org From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> To: Subject: RE: executable = exe + data Date: Sun, 1 Jan 2006 19:29:33 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Sam S wrote: >> * Brian Dessent [2005-12-31 15:46:50 -0800]: >> >> Sam Steingold wrote: >> >>> Is it possible? >>> >>> simply put, it it possible to write something like this: >>> >>> int main () { >>> size_t my_length; >>> >>> printf("exe size=%lld\n",my_length); >>> return 0; >>> } >> >> All the methods mentioned so far are essentially hacks working >> against the linker, doing stuff behind its back. Why not go with >> the flow? Put your data in its own section, and write a linker >> script to handle that section in the desired way. You can access >> the address by referencing the linker script variables in your >> source code. See section 3 of the ld manual, particularly 3.5.3. >> This should work on any platform that uses ld. > > the problems with this is that the "data" that is being appended is > not known at link time and appending it may not require C tools > (ld/gcc &c). Then your options seems to have shrunk to a "launcher" that basicly does system("lisp.exe -M lispinit.mem") Can you elaborate on _why_ the "single executable" is so important? Having a monolithic application exe is hardly doable in most cases, AFAICS. Unless you defer from using ANY external resources. /H -- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/