summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/os
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2013-02-08 19:21:10 +0100
committerSven Gothel <sgothel@jausoft.com>2013-02-08 19:21:10 +0100
commit371e1dbff6f5f255ab27ed0ab32368abb06eed82 (patch)
tree06cdfc232298a9305d7aaaa501fd831726ab52f2 /src/junit/com/jogamp/common/os
parent60409268e1d43be26b656b191d6684037f943123 (diff)
Bug 681: Use ELF Header + ARM EABI Section Parsing in PlatformPropsImpl to to distinguish ARM soft-float/hard-float (part-2)
+ /** + * Returns the {@link ABIType} of the current platform using given {@link CPUType cpuType} + * and {@link OSType osType} as a hint. + * <p> + * Note the following queries are performed: + * <ul> + * <li> not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI} </li> + * <li> else + * <ul> + * <li> not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL} </li> + * <li> else + * <ul> + * <li> Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF} </li> + * </ul></li> + * </ul></li> + * </ul> + * </p> + * <p> + * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}. + * </p> + * + * @param cpuType + * @param osType + * @return + */ + private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
Diffstat (limited to 'src/junit/com/jogamp/common/os')
-rw-r--r--src/junit/com/jogamp/common/os/TestElfReader01.java22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/junit/com/jogamp/common/os/TestElfReader01.java b/src/junit/com/jogamp/common/os/TestElfReader01.java
index fe6adc2..c04f2ac 100644
--- a/src/junit/com/jogamp/common/os/TestElfReader01.java
+++ b/src/junit/com/jogamp/common/os/TestElfReader01.java
@@ -39,27 +39,9 @@ public class TestElfReader01 extends JunitTracer {
void testElfHeaderImpl(String file, boolean fileOutSections) throws IOException {
RandomAccessFile in = new RandomAccessFile(file, "r");
try {
- ElfHeader eh = ElfHeader.read(in);
- byte[] e_ident = eh.d.getE_ident();
+ final ElfHeader eh = ElfHeader.read(in);
int i=0;
- System.err.print("[0..4]: 0x"+toHexString(e_ident[i++]));
- System.err.print(", 0x"+toHexString(e_ident[i++]));
- System.err.print(", 0x"+toHexString(e_ident[i++]));
- System.err.println(", 0x"+toHexString(e_ident[i++]));
- System.err.println("e_class "+e_ident[ElfHeader.EI_CLASS]+", "+eh.getArchClassBits()+" bits");
- System.err.println("e_data "+e_ident[ElfHeader.EI_DATA]+", "+eh.getDataEncodingMode());
- System.err.println("e_flags "+toHexString(eh.getFlags()));
- System.err.println(" ARM ABI "+eh.getArmABI());
- System.err.println(" ARM lGCC "+eh.getArmLegacyGCCFlags());
- System.err.println(" ARM FLOAT "+eh.getArmFloatMode()+", is hard-float "+(2 == eh.getArmFloatMode()));
- System.err.println("e_version "+e_ident[ElfHeader.EI_VERSION]);
- System.err.println("e_osabi "+eh.getOSABI()+", Linux "+ElfHeader.ELFOSABI_LINUX);
- System.err.println("e_abiversion "+e_ident[ElfHeader.EI_ABIVERSION]);
- System.err.println("e_machine "+eh.getMachine()+", isARM "+eh.isArm()+", isIntel "+eh.isIntel());
- System.err.println("e_version "+eh.d.getE_version());
- System.err.println("e_type "+eh.getType());
- System.err.println("EH Size "+eh.d.getE_ehsize());
- System.err.println("SH num "+eh.d.getE_shnum());
+ System.err.println(eh);
System.err.println("SH entsz "+eh.d.getE_shentsize());
System.err.println("SH off "+toHexString(eh.d.getE_shoff()));
System.err.println("SH strndx "+eh.d.getE_shstrndx());