flat assembler
Message board for the users of flat assembler.
Index
> Windows > How does Shared Library (DLL) Works? |
Author |
|
baldr 12 Mar 2013, 06:41
ivan_tux,
Remove relocations from both A and B, then you'll see. |
|||
12 Mar 2013, 06:41 |
|
AsmGuru62 12 Mar 2013, 12:34
Window loader will relocate one of DLLs (A or B, depending on which DLL was loaded first) to a new base address.
The base address inside of DLL itself is a suggestion and if there is a conflict -- DLL gets relocated. |
|||
12 Mar 2013, 12:34 |
|
comrade 12 Mar 2013, 13:24
With ASLR enabled, images will be relocated from their base address even if there are no conflicts.
|
|||
12 Mar 2013, 13:24 |
|
ACP 12 Mar 2013, 15:38
Tip: I'd suggest running the program under debugger to see how Windows manages it all for educational purposes.
|
|||
12 Mar 2013, 15:38 |
|
baldr 12 Mar 2013, 16:07
Another tip: Matt Pietrek wrote a whole bunch of articles about Windows loader. There was (and probably still is) Windows Research Kernel available for exploration, too.
|
|||
12 Mar 2013, 16:07 |
|
ACP 12 Mar 2013, 16:13
baldr wrote: Another tip: Matt Pietrek wrote a whole bunch of articles about Windows loader. There was (and probably still is) Windows Research Kernel available for exploration, too. Good point baldr! Two great articles about PE format from great Matt Pietrek (wish MS incorporated some of ideas and UI from SoftIce to windbg when they hired him): Original one: http://msdn.microsoft.com/en-us/library/ms809762.aspx Updated version from 2002: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx |
|||
12 Mar 2013, 16:13 |
|
baldr 12 Mar 2013, 16:32
ACP,
When big bucks want to shut up independent explorer, they hire him (or her). Though Mark Russinovich still struggles. |
|||
12 Mar 2013, 16:32 |
|
ivan_tux 17 Mar 2013, 06:13
How about all global variables?
Oh, wait... I know. Does it helped by "relocation table"? If so, how it work? i'm not understand it... |
|||
17 Mar 2013, 06:13 |
|
baldr 17 Mar 2013, 06:32
ivan_tux,
They're not so global (unless section is shared). DLL simply exports some names/ordinals that have some addresses (wrt DLL image base; they don't even have to be resident to it). What do you really want to know? How loader relocates DLL in case of VAS clash? How it snaps externals? State your problem exactly (and read that fine articles by Matt Pietrek, at least). |
|||
17 Mar 2013, 06:32 |
|
sinsi 17 Mar 2013, 07:14
This was a big help to me
http://msdn.microsoft.com/en-us/magazine/cc301727.aspx |
|||
17 Mar 2013, 07:14 |
|
ivan_tux 24 Mar 2013, 06:27
Ok, thanks for all..
I've found the answers |
|||
24 Mar 2013, 06:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.