示例#1
0
文件: asm.c 项目: 99years/plan9
static void
elf32jmp(Putl putl)
{
	/* describe a tiny text section at end with jmp to start; see below */
	elf32phdr(putl, PT_LOAD, HEADR+textsize-JMPSZ, 0xFFFFFFFC, 0xFFFFFFFC,
		JMPSZ, JMPSZ, R|X, 0);	/* text */
}
示例#2
0
文件: elf.c 项目: serge-hulne/golang
uint32
elfwritephdrs(void)
{
	int i;

	if (elf64) {
		for (i = 0; i < hdr.phnum; i++)
			elf64phdr(phdr[i]);
		return hdr.phnum * ELF64PHDRSIZE;
	}
	for (i = 0; i < hdr.phnum; i++)
		elf32phdr(phdr[i]);
	return hdr.phnum * ELF32PHDRSIZE;
}