Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The first milliseconds...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Cristian Prieto
August 31, 2015
Programming
0
24
The first milliseconds...
What happens when I run my application
Cristian Prieto
August 31, 2015
Tweet
Share
More Decks by Cristian Prieto
See All by Cristian Prieto
Docker, Containers and Cats...
cprieto
1
53
Other Decks in Programming
See All in Programming
AI巻き込み型コードレビューのススメ
nealle
1
270
ぼくの開発環境2026
yuzneri
0
220
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
Fluid Templating in TYPO3 14
s2b
0
130
CSC307 Lecture 06
javiergs
PRO
0
690
Grafana:建立系統全知視角的捷徑
blueswen
0
330
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
990
CSC307 Lecture 04
javiergs
PRO
0
660
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Data-Centric Kaggle
isax1015
2
770
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
220
Documentation Writing (for coders)
carmenintech
77
5.3k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Navigating Team Friction
lara
192
16k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Git: the NoSQL Database
bkeepers
PRO
432
66k
WCS-LA-2024
lcolladotor
0
450
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Bash Introduction
62gerente
615
210k
Transcript
The first milliseconds Or what happens before the ‘hello world’
I promise unicorns and cats
Who am I? Cristian Prieto (@cprieto)
Why? What is all about?
None
You will see… • Lot’s of unrelated cat pictures (and
maybe unicorns) • Hexadecimal notation • Debugger commands • A little of .NET code • ASSEMBLER!!!
It is simple…
The “classic” ‘Hello World’
We can compile this with GCC (the compiler)
Yay! we now have an executable!
So… the compiler generates executable code, right?
Not exactly
• Compiler: Compiles the code into assembler code • Assembler:
assemble the code into object format • Linker: Links the code with libraries • Loader: Loads the program for execution
None
• Compiler/assembler produce an object file • Object files are
consumed by the linker • The linker produces image files • An image file can be an executable, a static library or a shared (dynamic) library • The loader consumes image files
A 64 bit ELF Executable
What?! an ELF?!
Every OS has their own binary file format.
• Windows uses PE+ (which is a variant of COFF)
• MacOSX and iOS use Mach-O • Almost everything else (Linux, BSDs, Android, blah blah blah) use ELF
We will concentrate in “Windows” now
Time for history…
We had DOS…
Fitting memory…
The big jump…
PE was released for Windows NT
None
This program cannot be run in DOS mode
What about real Windows apps?
I thought this talk was about .NET
As part of the IL standard we generate PE files