1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.8.�Object File Portability</title><link rel="stylesheet" type="text/css" href="cs.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.0"><link rel="home" href="index.html" title="Sourcery CodeBench Lite"><link rel="up" href="chap-target.html" title="Chapter�3.�Sourcery CodeBench Lite for ARM EABI"><link rel="prev" href="arm-mcount.html" title="3.7.�ARM Profiling Implementation"><link rel="next" href="chap-building.html" title="Chapter�4.�Using Sourcery CodeBench from the Command Line"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.8.�Object File Portability</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="arm-mcount.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�Sourcery CodeBench Lite for ARM EABI</th><td width="20%" align="right">�<a accesskey="n" href="chap-building.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="portable-objects"></a>3.8.�Object File Portability</h2></div></div></div><p> 2 It is possible to create object files using Sourcery CodeBench for 3 ARM EABI 4 that are link-compatible with the 5 GNU C library provided with Sourcery CodeBench for ARM 6 GNU/Linux as well as with the CodeSourcery C Library or 7 Newlib C Library provided with 8 ARM bare-metal toolchains. 9 <span class="phrase"> 10 These object files are additionally link-compatible with 11 other ARM C Library ABI-compliant static linking environments 12 and toolchains. 13 </span> 14 </p><p> 15 To use this feature, when compiling your files with the bare-metal 16 ARM EABI 17 toolchain define the preprocessor constant 18 <code class="constant">_AEABI_PORTABILITY_LEVEL</code> to 1 19 before including any system header files. 20 For example, pass the option <code class="option">-D_AEABI_PORTABILITY_LEVEL=1</code> 21 on your compilation command line. 22 No special options are required when linking the resulting object files. 23 When building applications for ARM EABI, 24 files compiled with this definition may be linked freely with those 25 compiled without it. 26 </p><p> 27 Files compiled in this manner may not use the 28 functions <code class="function">fgetpos</code> 29 or <code class="function">fsetpos</code>, or reference the 30 type <code class="type">fpos_t</code>. This is because Newlib assumes a 31 representation for <code class="type">fpos_t</code> that is not AEABI-compliant. 32 </p><p> 33 Note that object files are only portable from bare-metal toolchains 34 to GNU/Linux, and 35 not vice versa; object files compiled for ARM 36 GNU/Linux targets cannot be linked into ARM EABI 37 executables. 38 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="arm-mcount.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="chap-target.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="chap-building.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.7.�ARM Profiling Implementation�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�4.�Using Sourcery CodeBench from the Command Line</td></tr></table></div></body></html> 39