mirror of
https://github.com/ElliotKillick/windows-vs-linux-loader-architecture
synced 2026-06-08 10:57:32 +00:00
8f9257c1da
From June to now, most of my time on this project was spent writing "The Rise of Microsoft". Researching and writing that thing took an inordinate amount of time. Also, I took a break to work primarily on another unreleased project I have before switching back to this one. I am proud of what I got here though and I feel like it is all coming together. My plans for the whitepapers are already well drafted and I know they will make an impact. I have learned a ton from working on this project and it has definitely given me something to idly think about and work on in my spare time. Finishing "The Problem with How Windows Uses Threads" was something I thought I wanted done before this release, but oh well. The main README is at about 50K words now, plus all the other smaller documents and you are looking at about a small novel's worth of technical writing. And technical writing takes multiple times longer than typical story writing. Anyway, this project is exciting for me - people who I show it to also really like it - and I am even more excited about what is to come!
Data Export Experiment
Linking with and printing a data export from a library.
Note that a data export cannot be lazily linked like a function export can be.
Windows has supported dynamic linking of data exports since Windows NT 3.1 (the first Windows NT release), the same as for function exports.
See the glibc equivalent experiment.
Internal View
Windows dynamic linking uses fast RIP-relative addressing (although, MASM abstracts that information out of the disassembly):
0:000> uf exe_test!get_shared_variable_address
exe_test!get_shared_variable_address [C:\Users\user\Documents\data-export\exe-test.c @ 6]:
6 00007ff7`8ba41000 48 8b 05 a9 21 00 00 mov rax,qword ptr [exe_test!_imp_shared_variable (00007ff7`8ba431b0)]
9 00007ff7`8ba41007 c3 ret