[Mono-list] mkbundle and cross compiling for ARM

markcoburnwa mcoburn at globalscape.com
Mon Jun 10 23:56:09 UTC 2013


I am interested in using mkbundle (without the static option) to simplify
deployment of a mono application to an ARM device.  I have successfully
cross-compiled mono using my ARM toolchain.  I also compiled mono on the
host machine without the cross compiler so I can compile my mono app using
xbuild.

I am now trying to instruct mkbundle to generate a native ARM executable
which bundles the mono executable, my mono app, and the class libraries it
references.  I know mkbundle looks at the CC and AS environment variables so
I set them beforehand to use the toolchain version.  Unfortunately, I get
"unrecognized symbol type" assembler errors.

Compiling:
/opt/arm-none-linux-gnueabi-as -o bundles.o temp.s 
temp.s: Assembler messages:
temp.s:4: Error: unrecognized symbol type ""
temp.s:216076: Error: unrecognized symbol type ""
temp.s:218568: Error: unrecognized symbol type ""
temp.s:3084240: Error: unrecognized symbol type ""

The top of my temp.s file looks like this:

.globl assembly_data_myapp_exe
        .section .rodata
        .p2align 5
        .type assembly_data_myapp_exe, @object
        .size assembly_data_myapp_exe, 216064
assembly_data_myapp_exe:

        .byte 77
        .byte 90
        .byte 144


The first error happened at line 4 which would be for type
assembly_data_myapp_exe.  It may be a possibility that even though I have
configured the environment variable CC to use my toolchain compiler,
mkbundle chooses not to use it and thus the resulting temp.s assembly file
is in a format that my toolchain assembler doesn't understand.

I am doing something like this on my host machine and using mkbundle that
was compiled targeting the host machine:

export CC="/opt/arm-none-linux-gnueabi-gcc-4.4.1"
export AS="/opt/arm-none-linux-gnueabi-as"

mkbundle -c -o myapp.c -oo bundles.o --deps myapp.exe --keeptemp


I am trying to avoid having to run any of these steps on the ARM device in
order to get this done.  Is this possible?  Any suggestions?



--
View this message in context: http://mono.1490590.n4.nabble.com/mkbundle-and-cross-compiling-for-ARM-tp4659904.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list