Need Help: Why there are two local labels "1:" in arch/x86/boot/header.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?)




[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux