.code32 .globl var var: .long 0 Let's assume elf binary format. This is a piece of assembly ( I have no idea what exactly assembly it is, I am familiar with nasm). I cannot understand what does it mean.
How is it interpreted? . It looks like global variable, but where it in an elf format file? In global section or in data section? When will be known address of var? After compilation or after linking?
Actually, the problem is with understanding Pintos's start.S file. https://github.com/abhinav-upadhyay/Pintos/blob/master/threads/start.S
Please note, that in line 202 there is the same issue. But, I cannot understand why in the line 48: addr32 movl %eax, init_ram_pages - LOADER_PHYS_BASE - 0x20000 It looks like init_ram_pages was virutal address. But, please note that in the line 48 the CPU is in real mode still!