pluto icon indicating copy to clipboard operation
pluto copied to clipboard

Lots of NOPs in boot code

Open SamTebbs33 opened this issue 5 years ago • 0 comments

When looking at the x86 boot code in pluto.elf with objdump you can see a lot of NOPs that seem to have no use whatsoever.

$ i686-elf-objdump -d bin/iso/boot/pluto.elf 
00102000 <_start>:
  102000:       b9 00 10 10 00          mov    $0x101000,%ecx
  102005:       0f 22 d9                mov    %ecx,%cr3
  102008:       0f 20 e1                mov    %cr4,%ecx
  10200b:       83 c9 10                or     $0x10,%ecx
  10200e:       0f 22 e1                mov    %ecx,%cr4
  102011:       0f 20 c1                mov    %cr0,%ecx
  102014:       81 c9 00 00 00 80       or     $0x80000000,%ecx
  10201a:       0f 22 c1                mov    %ecx,%cr0
  10201d:       e9 de df ef bf          jmp    c0000000 <KERNEL_VADDR_START>
  102022:       90                      nop
  102023:       90                      nop
  102024:       90                      nop
  102025:       90                      nop
  102026:       90                      nop
  102027:       90                      nop
  102028:       90                      nop
  102029:       90                      nop
  10202a:       90                      nop
  10202b:       90                      nop
  10202c:       90                      nop
  10202d:       90                      nop
  10202e:       90                      nop
  10202f:       90                      nop
  102030:       eb fe                   jmp    102030 <_start+0x30>

An investigation will be needed to determine if this is a build procedure issue or compiler issue.

SamTebbs33 avatar May 15 '19 14:05 SamTebbs33