Article View: comp.lang.asm.x86
Article #48Absolute addresses, relative addresses
From: Eric Minso
Date: Mon, 25 Aug 2003 09:21
Date: Mon, 25 Aug 2003 09:21
33 lines
2930 bytes
2930 bytes
Hello, I would like to know a bit more about the use of absolute addresses and relative addresses. I have read that Windows DLL have a relocation table : this table is needed to correct each absolute addresse in the DLL file because you can't assume the memory location where DLL while be loaded. But, why don't only use relative addresses ? (because it's not possible, I guess) In fact, my questions are : In which cases can you use relative addresses ? In which cases must you use absolute addresses ? In which cases can you choose ? (and which choice is better ? (i.e. for speed...)) Tell me if I am wrong : you can use relative addresses only inside a code section, and each time you reference another section, you must use absolute addresses. Is it right ? A last question before leaving :-) This instruction : mov [ ebp + cst ], val (with 'ebp' initialised with loading address, and 'cst' initialised with offset) can solve the absolute addresses problem, so where is the trap ? Thank you ! Eric.
Technical Details
Message-ID:
<7db38e60.0308250121.6135ebc1@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: feaef,44f17f79ebe31523,start X-Google-Attributes: gidfeaef,public X-Google-Thread: f7d8d,44f17f79ebe31523,start X-Google-Attributes: gidf7d8d,public X-Google-Thread: 1093da,44f17f79ebe31523,start X-Google-Attributes: gid1093da,public X-Google-Thread: 114917,44f17f79ebe31523,start X-Google-Attributes: gid114917,public X-Google-ArrivalTime: 2003-08-25 04:56:27 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mail From: minso@altern.org (Eric Minso) Newsgroups: comp.lang.asm.x86,alt.lang.asm,alt.os.assembly,borland.public.tasm Subject: Absolute addresses, relative addresses Approved: CLAX86 Moderators <ccrayne@crayne.org> Date: 25 Aug 2003 02:21:13 -0700 Organization: http://groups.google.com/ Message-ID: <7db38e60.0308250121.6135ebc1@posting.google.com> X-CLAX86-Policy: http://www.pacificsites.com/~ccrayne/clax86.html X-CLAX86-Faq: http://www.faqs.org/faqs/by-newsgroup/comp/comp.lang.asm.x86.html X-CLAX86-Info-1: Send submissions to comp-lang-asm-x86@moderators.isc.org X-CLAX86-Info-2: Send technical complaints to ccrayne@crayne.org X-CLAX86-Info-3: Send complaints about policy to ccrayne@crayne.org X-Comment: moderators do not necessarily agree or disagree with this article. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spamscanner: mailbox1.ucsd.edu (v1.2 May 26 2003 01:55:38, 0.0/5.0 2.55) X-Spam-Level: Level X-MailScanner: PASSED (v1.2.7 3070 h7P9LG0e016534 mailbox1.ucsd.edu), Found to be clean X-MailScanner-Information: Please contact the ISP for more information X-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=0, required 4) X-UIDL: 0'E"!#&c!!*9?"!a,-"! X-Complaints-To: abuse@supernews.com Lines: 34