bug in the way Linux loads elf files...
From: Mark Manning
Date: Sun Mar 11 2012 - 18:49:42 EST
It seems that the linux kernel does not exactly conform to the TIS elf
standard. as follows...
I have a small asm source file that a assemble with nasm
[section text]
global _start
_start:
mov eax, 1
int 0x80
after linking i end up with a elf executable which does nothing
execept terminate which of course works perfectly fine.
If however i modify the .text sections program header to make the
memory size larger than the file size the process is killed before it
is even run. I have not tracked down where this happens.
Type Offset VirtAddr PhysAddr FileSiz
MemSiz Flg Align
LOAD 0x000000 0x08048000 0x08048000 0x0007b 0x01000 R 0x1000
i patched MemSiz to be larger than FileSiz which should work but does not.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/