Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Patch libelf to build with gcc48
Alexandre Perrin committed 13 years ago
commit e0e9aec04cd48602a3d4cd21086ee1e8a4ed3583
parent 639f6d6
2 files changed +2 -6
modified external/libelf/elf_update.c
@@ -502,7 +502,7 @@ _libelf_resync_sections(Elf *e, off_t rc, struct _Elf_Extent_List *extents)
static off_t
_libelf_resync_elf(Elf *e, struct _Elf_Extent_List *extents)
{
-
	int ec, eh_class, eh_type;
+
	int ec, eh_class;
	unsigned int eh_byteorder, eh_version;
	size_t align, fsz;
	size_t phnum, shnum;
@@ -531,14 +531,12 @@ _libelf_resync_elf(Elf *e, struct _Elf_Extent_List *extents)
		eh_class     = eh32->e_ident[EI_CLASS];
		phoff        = (uint64_t) eh32->e_phoff;
		shoff        = (uint64_t) eh32->e_shoff;
-
		eh_type      = eh32->e_type;
		eh_version   = eh32->e_version;
	} else {
		eh_byteorder = eh64->e_ident[EI_DATA];
		eh_class     = eh64->e_ident[EI_CLASS];
		phoff        = eh64->e_phoff;
		shoff        = eh64->e_shoff;
-
		eh_type      = eh64->e_type;
		eh_version   = eh64->e_version;
	}

modified external/libelf/libelf_phdr.c
@@ -38,7 +38,7 @@ ELFTC_VCSID("$Id: libelf_phdr.c 2225 2011-11-26 18:55:54Z jkoshy $");
void *
_libelf_getphdr(Elf *e, int ec)
{
-
	size_t phnum, phentsize;
+
	size_t phnum;
	size_t fsz, msz;
	uint64_t phoff;
	Elf32_Ehdr *eh32;
@@ -69,11 +69,9 @@ _libelf_getphdr(Elf *e, int ec)

	if (ec == ELFCLASS32) {
		eh32      = (Elf32_Ehdr *) ehdr;
-
		phentsize = eh32->e_phentsize;
		phoff     = (uint64_t) eh32->e_phoff;
	} else {
		eh64      = (Elf64_Ehdr *) ehdr;
-
		phentsize = eh64->e_phentsize;
		phoff     = (uint64_t) eh64->e_phoff;
	}