Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 1 | .section ".reset" |
| 2 | .code16 |
| 3 | .globl reset_vector |
| 4 | reset_vector: |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 5 | .byte 0xe9 |
| 6 | .int _start - ( . + 2 ) |
| 7 | /* Note: The above jump is hand coded to work around bugs in binutils. |
| 8 | * 5 byte are used for a 3 byte instruction. This works because x86 |
| 9 | * is little endian and allows us to use supported 32bit relocations |
| 10 | * instead of the weird 16 bit relocations that binutils does not |
| 11 | * handle consistenly between versions because they are used so rarely. |
| 12 | */ |
Patrick Georgi | 938ef9f | 2014-01-18 16:24:24 +0100 | [diff] [blame] | 13 | .org 0x8; |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 14 | .code32 |
| 15 | jmp protected_start |
| 16 | .previous |