aboutsummaryrefslogtreecommitdiffstats
path: root/make/elf-header.cfg
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-02-02 00:22:29 +0100
committerSven Gothel <[email protected]>2015-02-02 00:22:29 +0100
commit7db9df61142694965b50f2e0553d4c9e5668439b (patch)
tree411c69a61d0f693acd55a65f458a2d2b75b84db8 /make/elf-header.cfg
parent234819d531cdf20842cd0b3302935b187b2012d6 (diff)
Bug 1126 - Remove static query requirement of MachineDescriptor, find matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues.
Currently the StaticConfig is being queried via the key[OSType, CPUType ..] as pre-determined by Java properties or the ELF parser. This adds complication to maintain different platforms and the key query might not even be sufficient. The MachineDescriptor's StaticConfig only purpose shall be to speed-up native data size and offset/alignment retrieval. This is done by using the StaticConfig index within all StaticConfig[]s as a lookup-index for the precomputed struct's size and offset tables. +++ Solution: Rename: MachineDescriptor -> MachineDataInfo Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime After having defined os.and.arch (OSType, CPUType and ABIType) w/ the optional help of the now self containing ELF Reader (Bug 1125), the native gluegen-rt library gets loaded enabling JNI methods. It is satisfactory to retrieve MachineDataInfo at runtime w/ JNI and find the matching/compatible StaticConfig. Only in case none is found, the program needs to abort. Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo are stored for further use (see above). This removes above complication and key to StaticConfig mapping. New platforms simply need to add a new unique entry into the StaticConfig[] table. ++ Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org, and Bug 1014 (MIPSLE), thanks to Dejan Latinovic. Parts of the patch for Bug 1014 from Dejan Latinovic are included. also solved by this change set.
Diffstat (limited to 'make/elf-header.cfg')
-rw-r--r--make/elf-header.cfg12
1 files changed, 6 insertions, 6 deletions
diff --git a/make/elf-header.cfg b/make/elf-header.cfg
index 53da3f6..c9c8be4 100644
--- a/make/elf-header.cfg
+++ b/make/elf-header.cfg
@@ -7,14 +7,14 @@ HierarchicalNativeOutput false
#Implements Sym64 Sym
# ELF-1 (part-1) is independent of CPUType/ABI
-# hence can use an arbitrary MachineDescriptor index
+# hence can use an arbitrary MachineDataInfo index
# for reading the struct Ehdr_p1 !
-StructMachineDescriptorIndex Ehdr_p1 private static final int mdIdx = 0;
+StructMachineDataInfoIndex Ehdr_p1 private static final int mdIdx = 0;
# The following sub structures shall use an mdIdx
# defined by ELF-1 header code, set w/ ctor!
-StructMachineDescriptorIndex Ehdr_p2 private final int mdIdx;
-StructMachineDescriptorIndex Shdr private final int mdIdx;
+StructMachineDataInfoIndex Ehdr_p2 private final int mdIdx;
+StructMachineDataInfoIndex Shdr private final int mdIdx;
ManuallyImplement Ehdr_p2.size
ManuallyImplement Ehdr_p2.create
@@ -37,7 +37,7 @@ CustomJavaCode Ehdr_p2 }
CustomJavaCode Ehdr_p2
CustomJavaCode Ehdr_p2 Ehdr_p2(final int mdIdx, final java.nio.ByteBuffer buf) {
CustomJavaCode Ehdr_p2 this.mdIdx = mdIdx;
-CustomJavaCode Ehdr_p2 this.md = MachineDescription.StaticConfig.values()[mdIdx].md;
+CustomJavaCode Ehdr_p2 this.md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
CustomJavaCode Ehdr_p2 this.accessor = new StructAccessor(buf);
CustomJavaCode Ehdr_p2 }
@@ -55,7 +55,7 @@ CustomJavaCode Shdr }
CustomJavaCode Shdr
CustomJavaCode Shdr Shdr(final int mdIdx, final java.nio.ByteBuffer buf) {
CustomJavaCode Shdr this.mdIdx = mdIdx;
-CustomJavaCode Shdr this.md = MachineDescription.StaticConfig.values()[mdIdx].md;
+CustomJavaCode Shdr this.md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
CustomJavaCode Shdr this.accessor = new StructAccessor(buf);
CustomJavaCode Shdr }