An experiment – running the memprot program on an ARM-32

As an interesting experiment, we will cross-compile our preceding memprot program for an ARM system. I have used a convenient way to do this without real hardware: using the powerful Free and Open Source Software (FOSS) Quick Emulator (QEMU) project, to emulate an ARM Versatile Express Cortex-A9 platform!

Cross-compiling the code is indeed simple: notice that there is now a CROSS_COMPILE variable in our Makefile; it's the cross-compiler prefix the prefix string identifying the toolchain (common to all tools). It's literally prefixed onto the CC (for gcc, or CL for clang) variable, which is the compiler used to build the target. Unfortunately, going into more detail regarding cross-compiling ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.