The actual point of linux kernel starts from _start, which is 512byte offset from 0x7c00 .globl _start _start: # Explicitly enter this as bytes, or the assembler # tries to generate a 3-byte jump here, which causes # everything else to push off to the wrong offset. .byte 0xeb # short (2-byte) jump .byte start_of_setup-1f and it jumps to start_of_setup-1f , 1f stands for local lable 1: but there are two local labels 1: in kernel 5.19 header.S #line 305 1: # Part 2 of the header, from the old setup.S #line 609 1: addw $STACK_SIZE, %dx jnc 2f xorw %dx, %dx # Prevent wraparound could anyone please help me understand how the assembler knows to jump where (I know it jumps to line 305 but why?)
- Follow-Ups:
- Re: Need Help: Why there are two local labels "1:" in arch/x86/boot/header.S
- From: Brian Raiter
- Re: Need Help: Why there are two local labels "1:" in arch/x86/boot/header.S
- Prev by Date: Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Next by Date: Re: Need Help: Why there are two local labels "1:" in arch/x86/boot/header.S
- Previous by thread: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Next by thread: Re: Need Help: Why there are two local labels "1:" in arch/x86/boot/header.S
- Index(es):