🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1146

Re: Borland C++: relocate data section in .exe?

#1146
From: Devin Ben-Hur
Date: Mon, 08 Apr 1991 17:21
18 lines
1304 bytes
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"
Technical Details
Message-ID: <13732@adobe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!adobe!dbenhur
References: <1991Apr5.201638.5288@contact.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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