Reputation: 143
I am learning x86 assembly slowly. I understand there are two different syntaxes (Intel and AT&T). The assembly instructions here are the first instructions the Linux Kernel uses to decompress it's image and start KASLR.
00: leal (BP_scratch+4)(%esi), %esp
01: call 1f
02: 1: popl %edx
03: addl $_GLOBAL_OFFSET_TABLE_+(.-1b), %edx
04:
05: /* Load new GDT */
06: leal gdt@GOTOFF(%edx), %eax
07: movl %eax, 2(%eax)
08: lgdt (%eax)
09:
0A: /* Load segment registers with our descriptors */
0B: movl $__BOOT_DS, %eax
0C: movl %eax, %ds
0D: movl %eax, %es
0E: movl %eax, %fs
0F: movl %eax, %gs
10: movl %eax, %ss
$esi
on the first line?%edx
?movl
? Is %eax
set to %eax + 2
? This does not follow the AT&T syntax.__BOOT_DS
constant?Upvotes: 0
Views: 60