Angel Pons | f23ae0b | 2020-04-02 23:48:12 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin Roth | 6add44b | 2017-02-09 17:51:20 -0800 | [diff] [blame] | 2 | |
Aaron Durbin | 0fd068b | 2016-03-02 14:55:32 -0600 | [diff] [blame] | 3 | .section ".reset", "ax", %progbits |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 4 | .code16 |
Aaron Durbin | 4330a9c | 2016-03-02 15:13:12 -0600 | [diff] [blame] | 5 | .globl _start |
| 6 | _start: |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 7 | .byte 0xe9 |
Aaron Durbin | f8468d4 | 2016-03-02 14:47:37 -0600 | [diff] [blame] | 8 | .int _start16bit - ( . + 2 ) |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 9 | /* Note: The above jump is hand coded to work around bugs in binutils. |
| 10 | * 5 byte are used for a 3 byte instruction. This works because x86 |
| 11 | * is little endian and allows us to use supported 32bit relocations |
| 12 | * instead of the weird 16 bit relocations that binutils does not |
Martin Roth | 6a3d0bf | 2017-04-04 14:20:33 -0600 | [diff] [blame] | 13 | * handle consistently between versions because they are used so rarely. |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 14 | */ |