Commit c00c5e5b authored by kgardas's avatar kgardas

get rid of Elf32/Elf64_Section as this is a non-portable Linux-ism.

D1357 introduces usage of Elf32_Section/Elf64_Section in RTS linker
code. Unfortunately this is a non-portable Linux-ism and such types are not
defined anywhere except the Linux-land probably. I've checked Solaris 11.2,
Solaris 11.3, FreeBSD 10.1, NetBSD 6.1.5 and OpenBSD current. The fix
is easy to use `unsigned short' as this is also an underlying type
of those Elf*_Section defines in Linux.

Reviewers: olsner, austin, bgamari, erikd

Subscribers: thomie

Differential Revision:
parent 1e2259b3
......@@ -4030,7 +4030,6 @@ ocRunInit_PEi386 ( ObjectCode *oc )
#define Elf_Ehdr Elf64_Ehdr
#define Elf_Phdr Elf64_Phdr
#define Elf_Shdr Elf64_Shdr
#define Elf_Section Elf64_Section
#define Elf_Sym Elf64_Sym
#define Elf_Rel Elf64_Rel
#define Elf_Rela Elf64_Rela
......@@ -4055,7 +4054,6 @@ ocRunInit_PEi386 ( ObjectCode *oc )
#define Elf_Ehdr Elf32_Ehdr
#define Elf_Phdr Elf32_Phdr
#define Elf_Shdr Elf32_Shdr
#define Elf_Section Elf32_Section
#define Elf_Sym Elf32_Sym
#define Elf_Rel Elf32_Rel
#define Elf_Rela Elf32_Rela
......@@ -4629,7 +4627,7 @@ ocGetNames_ELF ( ObjectCode* oc )
HsBool isWeak = HS_BOOL_FALSE;
char* ad = NULL;
char* nm = strtab + stab[j].st_name;
Elf_Section shndx = stab[j].st_shndx;
unsigned short shndx = stab[j].st_shndx;
Elf_Word secno;
/* See Note [Many ELF Sections] */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment