From a3f2d08801c5a54048faca52f422bcededf81b2a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 1 Feb 2015 05:21:39 +0100 Subject: Bug 1125 - Make ELF Reader 'jogamp.common.os.elf' Stateless ELF Reader 'jogamp.common.os.elf' currently uses Platform's pre-determined OS_TYPE and CPUType. It also uses the host platforms MachineDescription, hence can not read ELF files from other machines. This also forbids Platform to determine CPUType etc w/o having a valid 'os.arch' property. +++ ElfHeader should be split in - ElfHeaderPart1 (CPUType independent) - ElfHeaderPart2 (CPUType dependent) Fix shall make the ELF Reader self containing by only using ELF CPUType data, etc. This requires customization of struct parsing, where MachineDescription.Static index shall be - defined in ElfHeaderPart1 using e_Ident's CPUType. - used in ElfHeaderPart2 and all its struct types. --- make/stub_includes/os/elf_header.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'make/stub_includes/os/elf_header.h') diff --git a/make/stub_includes/os/elf_header.h b/make/stub_includes/os/elf_header.h index 7d608f0..b303029 100644 --- a/make/stub_includes/os/elf_header.h +++ b/make/stub_includes/os/elf_header.h @@ -15,6 +15,9 @@ typedef struct { uint16_t e_type; uint16_t e_machine; uint32_t e_version; +} Ehdr_p1; + +typedef struct { ElfN_Addr e_entry; ElfN_Off e_phoff; ElfN_Off e_shoff; @@ -25,7 +28,7 @@ typedef struct { uint16_t e_shentsize; uint16_t e_shnum; uint16_t e_shstrndx; -} Ehdr; +} Ehdr_p2; typedef struct { uint32_t sh_name; -- cgit v1.2.3