diff options
author | Sven Gothel <[email protected]> | 2013-02-08 05:12:39 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-08 05:12:39 +0100 |
commit | 2432dbef17c1dc4164f055cf434073bdabf8a6a9 (patch) | |
tree | 348a46b246ead8bb508152a96847a62089b72d0c /make/build.xml | |
parent | 1118cb7182611d0a77764a3c781a1148849b3022 (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 'make/build.xml')
-rw-r--r-- | make/build.xml | 59 |
1 files changed, 53 insertions, 6 deletions
diff --git a/make/build.xml b/make/build.xml index 76187a1..b9d4985 100644 --- a/make/build.xml +++ b/make/build.xml @@ -151,7 +151,12 @@ <property name="jogamp.common.classes" value="com/jogamp/common/** jogamp/common/**"/> <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp-android-launcher.classes}" /> + </target> + <target name="init.gg" depends="init"> + <!-- Define the GlueGen task we just built --> + <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask" + classpathref="gluegen.classpath" /> </target> <target name="set.debug"> @@ -191,14 +196,51 @@ </antlr> </target> - <!-- Use GlueGen to generate the source code for the NativeLibrary + <property name="gluegen.root" value="../" /> + + <!-- Use GlueGen to generate the source code for the ElfHeader implementation. Note that to make the build process simpler (in particular, the nightly builds) we do not do this every time we run the build, but instead check in the generated sources to the source tree. --> + <target name="generate.os.sources" depends="init.gg" > + <property name="stub.includes.gluegen.gg" value="stub_includes/gluegen" /> + <dirset id="stub.includes.fileset.os" dir="."> + <include name="stub_includes/os/**" /> + </dirset> + <gluegen src="stub_includes/os/elf_header.h" + config="elf-header.cfg" + includeRefId="stub.includes.fileset.os" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.JavaEmitter" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + <!-- Only to cherry pick defines -> java files + <gluegen src="stub_includes/os/elf_eh_const.h" + config="elf-eh-const.cfg" + includeRefId="stub.includes.fileset.os" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.JavaEmitter" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + <gluegen src="stub_includes/os/elf_sh_const.h" + config="elf-sh-const.cfg" + includeRefId="stub.includes.fileset.os" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.JavaEmitter" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> --> + </target> - <property name="gluegen.root" value="../" /> - <target name="generate.nativelibrary.sources" depends="init" > + <!-- Use GlueGen to generate the source code for the NativeLibrary + implementation. Note that to make the build process simpler (in + particular, the nightly builds) we do not do this every time we + run the build, but instead check in the generated sources to + the source tree. --> + <target name="generate.nativelibrary.sources" depends="init.gg" > <!-- Define the appropriate include paths --> <dirset id="stub.includes.fileset.windows" dir="."> <include name="stub_includes/windows/**" /> @@ -209,9 +251,6 @@ <dirset id="stub.includes.fileset.macosx" dir="."> <include name="stub_includes/macosx/**" /> </dirset> - <!-- Define the GlueGen task we just built --> - <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask" - classpathref="gluegen.classpath" /> <!-- Execute it against all of the OSs' header files --> <gluegen src="stub_includes/windows/dynamic-linker.h" @@ -222,6 +261,14 @@ debug="false"> <classpath refid="gluegen.classpath" /> </gluegen> + <gluegen src="stub_includes/unix/elf-header.h" + config="dynlink-unix.cfg" + includeRefId="stub.includes.fileset.unix" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> <gluegen src="stub_includes/unix/dynamic-linker.h" config="dynlink-unix.cfg" includeRefId="stub.includes.fileset.unix" |