File:  [Qemu by Fabrice Bellard] / qemu / roms / ipxe / src / arch / i386 / prefix / linuxprefix.S
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:58:23 2018 UTC (8 years, 1 month ago) by root
Branches: qemu, MAIN
CVS tags: qemu1101, qemu1001, qemu1000, qemu0151, HEAD
qemu 0.15.1

#include <linux/unistd.h>

	.section ".text"
	.code32
	.globl _linux_start
	.type _linux_start, @function

_linux_start:
	xorl	%ebp, %ebp

	popl	%esi       // save argc
	movl	%esp, %edi // save argv

	andl	$~15, %esp // 16-byte align the stack

	pushl	%edi // argv -> C arg2
	pushl	%esi // argc -> C arg1

	call	save_args

	/* Our main doesn't use any arguments */
	call	main

	movl	%eax, %ebx // rc -> syscall arg1
	movl	$__NR_exit, %eax
	int	$0x80

	.size _linux_start, . - _linux_start

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.