Rev 1906 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1906 | Rev 3805 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | .section .init |
1 | .section .init |
Line 2... | Line 2... | ||
2 | 2 | ||
Line -... | Line 3... | ||
- | 3 | .global __start |
|
- | 4 | ||
- | 5 | #tls:0 pid process id |
|
- | 6 | #tls:4 tid reserved for thread slot |
|
- | 7 | #tls:8 thread's stack low limit |
|
- | 8 | #tls:12 thread's stack high limit |
|
3 | .global __start |
9 | #tls:16 reseved for libc |
4 | 10 | ||
5 | .align 4 |
11 | .align 4 |
6 | __start: |
12 | __start: |
7 | movl $68, %eax |
13 | movl $68, %eax |
Line 13... | Line 19... | ||
13 | testl %eax, %eax |
19 | testl %eax, %eax |
14 | jz 1f |
20 | jz 1f |
15 | 21 | ||
Line 16... | Line 22... | ||
16 | addl %eax, %ecx |
22 | addl %eax, %ecx |
17 | movl %eax, %fs:4 |
23 | movl %eax, %fs:8 |
18 | movl %ecx, %fs:8 #save stack base - low limit |
24 | movl %ecx, %fs:12 #save stack base - low limit |
19 | #save stack top - high limit |
25 | #save stack top - high limit |
20 | movl %ecx, %esp #reload stack |
26 | movl %ecx, %esp #reload stack |
Line 21... | Line 27... | ||
21 | 27 | ||
Line 28... | Line 34... | ||
28 | 34 | ||
Line 29... | Line 35... | ||
29 | movl 30(%ebx), %eax |
35 | movl 30(%ebx), %eax |
30 | movl %eax, %fs:0 #save pid |
36 | movl %eax, %fs:0 #save pid |
Line 31... | Line -... | ||
31 | - | ||
32 | movl $__tls_map, %edi #init TLS |
37 | |
33 | movl $32, %ecx |
- | |
34 | xorl %eax, %eax |
- | |
35 | notl %eax |
- | |
36 | - | ||
37 | rep |
- | |
Line 38... | Line -... | ||
38 | stosl |
- | |
39 | 38 | addl $1024, %esp |
|
40 | movb $0xF0, __tls_map |
39 | |
41 | jmp ___crt_startup |
40 | jmp ___crt_startup |
Line 42... | Line 41... | ||
42 | 1: |
41 | 1: |