summaryrefslogtreecommitdiffstats
path: root/doc/elf
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-02-08 05:12:39 +0100
committerSven Gothel <[email protected]>2013-02-08 05:12:39 +0100
commit2432dbef17c1dc4164f055cf434073bdabf8a6a9 (patch)
tree348a46b246ead8bb508152a96847a62089b72d0c /doc/elf
parent1118cb7182611d0a77764a3c781a1148849b3022 (diff)
Bug 681: Add Basic ELF Header + ARM EABI Section Parsing, allowing to distinguish ARM soft-float/hard-float (part-1)
https://jogamp.org/bugzilla/show_bug.cgi?id=681 + * References: + * <ul> + * <li>http://linux.die.net/man/5/elf</li> + * <li>http://www.sco.com/developers/gabi/latest/contents.html</li> + * <li>http://infocenter.arm.com/ + * <ul> + * <li>ARM IHI 0044E, current through ABI release 2.09</li> + * <li>ARM IHI 0045D, current through ABI release 2.09</li> + * </ul></li> Added self contained jogamp.common.os.elf package w/ entry point class ElfHeader to read a RandomAccessFile and parse it as an ELF file. ELF Parsing completness: - Header: OK - SectionHeader: OK - Section Type SHT_ARM_ATTRIBUTES: OK - Will be read into SectionArmAttributes - Used to distinguisgh soft/hard VFP float Tested manually on: - Linux intel 32bit / 64bit, arm soft-float and hard-float
Diffstat (limited to 'doc/elf')
-rw-r--r--doc/elf/crosstest-java-linux-armv6hf-panda.log61
-rw-r--r--doc/elf/crosstest-java-linux-armv6hf-raspi.log61
-rw-r--r--doc/elf/crosstest-java-linux-armv6sf-panda.log60
3 files changed, 182 insertions, 0 deletions
diff --git a/doc/elf/crosstest-java-linux-armv6hf-panda.log b/doc/elf/crosstest-java-linux-armv6hf-panda.log
new file mode 100644
index 0000000..cad24ec
--- /dev/null
+++ b/doc/elf/crosstest-java-linux-armv6hf-panda.log
@@ -0,0 +1,61 @@
+JUnit version 4.8.2
+.++++ TestCase.setUp: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+[0..4]: 0x0x7f, 0x0x45, 0x0x4c, 0x0x46
+e_class 1, 32 bits
+e_data 1, 1
+e_flags 0x5000002
+ ARM ABI 5
+ ARM lGCC 2
+ ARM FLOAT 0, is hard-float false
+e_version 1
+e_osabi 0, Linux 3
+e_abiversion 0
+e_machine 40, isARM true, isIntel false
+e_version 1
+e_type 2
+EH Size 52
+SH num 29
+SH entsz 40
+SH off 0x1168
+SH strndx 28
+SH num 29
+SH size 40
+abiVFPArgsAcceptsVFPVariant true
+SectionHeader[idx 0, name , type 0x0, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 1, name .interp, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 2, name .note.ABI-tag, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 3, name .note.gnu.build-id, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 4, name .hash, type 0x5, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 5, name .gnu.hash, type 0x6ffffff6, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 6, name .dynsym, type 0xb, link 7, info 0x1, flags 0x2]
+SectionHeader[idx 7, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2]
+SHT_STRTAB: read 270, Section[SectionHeader[idx 7, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2], data[off 0, len 270/270]]
+SectionHeader[idx 8, name .gnu.version, type 0x6fffffff, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 9, name .gnu.version_r, type 0x6ffffffe, link 7, info 0x2, flags 0x2]
+SectionHeader[idx 10, name .rel.dyn, type 0x9, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 11, name .rel.plt, type 0x9, link 6, info 0xd, flags 0x2]
+SectionHeader[idx 12, name .init, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 13, name .plt, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 14, name .text, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 15, name .fini, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 16, name .rodata, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 17, name .ARM.exidx, type 0x70000001, link 14, info 0x0, flags 0x82]
+SectionHeader[idx 18, name .eh_frame, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 19, name .init_array, type 0xe, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 20, name .fini_array, type 0xf, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 21, name .jcr, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 22, name .dynamic, type 0x6, link 7, info 0x0, flags 0x3]
+SectionHeader[idx 23, name .got, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 24, name .data, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 25, name .bss, type 0x8, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 26, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0]
+SHT_ARM_ATTRIBUTES: read 51, SectionArmAttributes[SectionHeader[idx 26, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0], data[off 0, len 51/51], [aeabi[CPU_name = 7-A, CPU_arch = 10, CPU_arch_profile = 65, ARM_ISA_use = 1, THUMB_ISA_use = 2, FP_arch = 4, ABI_PCS_wchar_t = 4, ABI_FP_denormal = 1, ABI_FP_exceptions = 1, ABI_FP_number_model = 3, ABI_align_needed = 1, ABI_align_preserved = 1, ABI_enum_size = 2, ABI_HardFP_use = 3, ABI_VFP_args = 1, CPU_unaligned_access = 1]]]
+SectionHeader[idx 27, name .gnu_debuglink, type 0x1, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 28, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0]
+SHT_STRTAB: read 256, Section[SectionHeader[idx 28, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0], data[off 0, len 256/256]]
+++++ TestCase.tearDown: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+
+Time: 0.163
+
+OK (1 test)
+
diff --git a/doc/elf/crosstest-java-linux-armv6hf-raspi.log b/doc/elf/crosstest-java-linux-armv6hf-raspi.log
new file mode 100644
index 0000000..724ee8e
--- /dev/null
+++ b/doc/elf/crosstest-java-linux-armv6hf-raspi.log
@@ -0,0 +1,61 @@
+JUnit version 4.8.2
+.++++ TestCase.setUp: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+[0..4]: 0x0x7f, 0x0x45, 0x0x4c, 0x0x46
+e_class 1, 32 bits
+e_data 1, 1
+e_flags 0x5000002
+ ARM ABI 5
+ ARM lGCC 2
+ ARM FLOAT 0, is hard-float false
+e_version 1
+e_osabi 0, Linux 3
+e_abiversion 0
+e_machine 40, isARM true, isIntel false
+e_version 1
+e_type 2
+EH Size 52
+SH num 29
+SH entsz 40
+SH off 0x1168
+SH strndx 28
+SH num 29
+SH size 40
+abiVFPArgsAcceptsVFPVariant true
+SectionHeader[idx 0, name , type 0x0, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 1, name .interp, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 2, name .note.ABI-tag, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 3, name .note.gnu.build-id, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 4, name .hash, type 0x5, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 5, name .gnu.hash, type 0x6ffffff6, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 6, name .dynsym, type 0xb, link 7, info 0x1, flags 0x2]
+SectionHeader[idx 7, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2]
+SHT_STRTAB: read 307, Section[SectionHeader[idx 7, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2], data[off 0, len 307/307]]
+SectionHeader[idx 8, name .gnu.version, type 0x6fffffff, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 9, name .gnu.version_r, type 0x6ffffffe, link 7, info 0x2, flags 0x2]
+SectionHeader[idx 10, name .rel.dyn, type 0x9, link 6, info 0x0, flags 0x2]
+SectionHeader[idx 11, name .rel.plt, type 0x9, link 6, info 0xd, flags 0x2]
+SectionHeader[idx 12, name .init, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 13, name .plt, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 14, name .text, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 15, name .fini, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 16, name .rodata, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 17, name .ARM.exidx, type 0x70000001, link 14, info 0x0, flags 0x82]
+SectionHeader[idx 18, name .eh_frame, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 19, name .init_array, type 0xe, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 20, name .fini_array, type 0xf, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 21, name .jcr, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 22, name .dynamic, type 0x6, link 7, info 0x0, flags 0x3]
+SectionHeader[idx 23, name .got, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 24, name .data, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 25, name .bss, type 0x8, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 26, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0]
+SHT_ARM_ATTRIBUTES: read 49, SectionArmAttributes[SectionHeader[idx 26, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0], data[off 0, len 49/49], [aeabi[CPU_name = 6, CPU_arch = 6, ARM_ISA_use = 1, THUMB_ISA_use = 1, FP_arch = 2, ABI_PCS_wchar_t = 4, ABI_FP_denormal = 1, ABI_FP_exceptions = 1, ABI_FP_number_model = 3, ABI_align_needed = 1, ABI_align_preserved = 1, ABI_enum_size = 2, ABI_HardFP_use = 3, ABI_VFP_args = 1, CPU_unaligned_access = 1, DIV_use = 1]]]
+SectionHeader[idx 27, name .gnu_debuglink, type 0x1, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 28, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0]
+SHT_STRTAB: read 256, Section[SectionHeader[idx 28, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0], data[off 0, len 256/256]]
+++++ TestCase.tearDown: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+
+Time: 1.016
+
+OK (1 test)
+
diff --git a/doc/elf/crosstest-java-linux-armv6sf-panda.log b/doc/elf/crosstest-java-linux-armv6sf-panda.log
new file mode 100644
index 0000000..9cc339a
--- /dev/null
+++ b/doc/elf/crosstest-java-linux-armv6sf-panda.log
@@ -0,0 +1,60 @@
+JUnit version 4.8.2
+.++++ TestCase.setUp: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+[0..4]: 0x0x7f, 0x0x45, 0x0x4c, 0x0x46
+e_class 1, 32 bits
+e_data 1, 1
+e_flags 0x5000002
+ ARM ABI 5
+ ARM lGCC 2
+ ARM FLOAT 0, is hard-float false
+e_version 1
+e_osabi 0, Linux 3
+e_abiversion 0
+e_machine 40, isARM true, isIntel false
+e_version 1
+e_type 2
+EH Size 52
+SH num 28
+SH entsz 40
+SH off 0x828c
+SH strndx 27
+SH num 28
+SH size 40
+abiVFPArgsAcceptsVFPVariant false
+SectionHeader[idx 0, name , type 0x0, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 1, name .interp, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 2, name .note.ABI-tag, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 3, name .note.gnu.build-id, type 0x7, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 4, name .gnu.hash, type 0x6ffffff6, link 5, info 0x0, flags 0x2]
+SectionHeader[idx 5, name .dynsym, type 0xb, link 6, info 0x1, flags 0x2]
+SectionHeader[idx 6, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2]
+SHT_STRTAB: read 1000, Section[SectionHeader[idx 6, name .dynstr, type 0x3, link 0, info 0x0, flags 0x2], data[off 0, len 1000/1000]]
+SectionHeader[idx 7, name .gnu.version, type 0x6fffffff, link 5, info 0x0, flags 0x2]
+SectionHeader[idx 8, name .gnu.version_r, type 0x6ffffffe, link 6, info 0x5, flags 0x2]
+SectionHeader[idx 9, name .rel.dyn, type 0x9, link 5, info 0x0, flags 0x2]
+SectionHeader[idx 10, name .rel.plt, type 0x9, link 5, info 0xc, flags 0x2]
+SectionHeader[idx 11, name .init, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 12, name .plt, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 13, name .text, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 14, name .fini, type 0x1, link 0, info 0x0, flags 0x6]
+SectionHeader[idx 15, name .rodata, type 0x1, link 0, info 0x0, flags 0x2]
+SectionHeader[idx 16, name .ARM.exidx, type 0x70000001, link 13, info 0x0, flags 0x82]
+SectionHeader[idx 17, name .init_array, type 0xe, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 18, name .fini_array, type 0xf, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 19, name .jcr, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 20, name .data.rel.ro, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 21, name .dynamic, type 0x6, link 6, info 0x0, flags 0x3]
+SectionHeader[idx 22, name .got, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 23, name .data, type 0x1, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 24, name .bss, type 0x8, link 0, info 0x0, flags 0x3]
+SectionHeader[idx 25, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0]
+SHT_ARM_ATTRIBUTES: read 49, SectionArmAttributes[SectionHeader[idx 25, name .ARM.attributes, type 0x70000003, link 0, info 0x0, flags 0x0], data[off 0, len 49/49], [aeabi[CPU_name = 7-A, CPU_arch = 10, CPU_arch_profile = 65, ARM_ISA_use = 1, THUMB_ISA_use = 2, FP_arch = 4, ABI_PCS_wchar_t = 4, ABI_FP_denormal = 1, ABI_FP_exceptions = 1, ABI_FP_number_model = 3, ABI_align_needed = 1, ABI_align_preserved = 1, ABI_enum_size = 2, ABI_HardFP_use = 3, DIV_use = 1]]]
+SectionHeader[idx 26, name .gnu_debuglink, type 0x1, link 0, info 0x0, flags 0x0]
+SectionHeader[idx 27, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0]
+SHT_STRTAB: read 259, Section[SectionHeader[idx 27, name .shstrtab, type 0x3, link 0, info 0x0, flags 0x0], data[off 0, len 259/259]]
+++++ TestCase.tearDown: com.jogamp.common.os.TestElfReader01 - testGNULinuxSelfExe
+
+Time: 0.083
+
+OK (1 test)
+