aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes/os
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-02-01 05:21:39 +0100
committerSven Gothel <[email protected]>2015-02-01 05:21:39 +0100
commita3f2d08801c5a54048faca52f422bcededf81b2a (patch)
tree96e83956b62ae3e25043ccc67f4cb1c2c1f232a1 /make/stub_includes/os
parent0deceee37d943faa7c34971388863a27f395d6a5 (diff)
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.
Diffstat (limited to 'make/stub_includes/os')
-rw-r--r--make/stub_includes/os/elf_header.h5
1 files changed, 4 insertions, 1 deletions
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;