Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!adobe!dbenhur From: dbenhur@adobe.COM (Devin Ben-Hur) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Borland C++: relocate data section in .exe? Message-ID: <13732@adobe.UUCP> Date: 8 Apr 91 17:21:04 GMT References: <1991Apr5.201638.5288@contact.uucp> Reply-To: dbenhur@adobe.UUCP (Devin Ben-Hur) Organization: Adobe Systems Incorporated, Mountain View Lines: 18 In article <1991Apr5.201638.5288@contact.uucp> yung@contact.uucp () writes: >A quick question: I am using Borland's C++ 2.0 to compile a project (1 C >module and 2 assembly module). But I need the resulting executable file >to have the data section comes BEFORE the code section. Make a .ASM module that contains no code or data but does define all the sections you want to explicitely order, in the order you desire them. Make this module the first .OBJ file in your link directives. I haven't tested this with the 2.0 compiler but it's worked before. If you want to use the IDE Project facility, it always links the C0? module first, so find the source to it and add your segment ordering to that file and re-assemble. -- --- Devin Ben-Hur dbenhur@adobe.com 415/962-6074 drazil@netcom.com "Me, not Adobe"