Specifications
Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 171
UG111 (v1.4) January 30, 2004 1-800-255-7778
Compiler Interface
R
Libraries
Both the compiler (powerpc-eabi-gcc and mb-gcc) use certain libraries. The following
libraries are needed for all the program.
All the libraries are linked in automatically by both the compiler. The search path for these
libraries might have to be given to the compiler, if the standard libraries are overridden.
The libxil.a is modified by the Library Generator tool to add driver and library routines.
Compiler Interface
Input Files
The compiler (mb-gcc and the powerpc-eabi-gcc) take one or more of the following files are
input
x C source files.
x C++ source files.
x Assembly Files.
x Object Files.
x Linker scripts (These are optional and if not specified, the default linker script
embedded in the linker (mb-ld or powerpc-eabi-ld) will be used.
The default extensions for each of these types is detailed in Table 11-4. In addition to the
files mentioned above, the compiler implicitly refers to the following files.
x Libraries (libc.a, libm.a and libxil.a). The default location for these files is the EDK
installation directory.
Output Files
The compiler generates the following files as output
x An elf file (The default output file name is a.out on Solaris and a.exe on Windows)
x Assembly file (if -save-temps or -S option is used)
x Object file (if -save-temps or -c option is used)
.S Assembly File, but might have preprocessor directives
.s Assembly File with no preprocessor directives
Table 11-4: File Extensions
Extension File type
Table 11-5: Libraries used by the compilers
Library Particular
libxil.a Contain drivers, software services (such as XilNet & XilMFS) and
initialization files developed for the EDK tools
libc.a Standard C libraries, including functions like strcmp, strlen etc
libm.a Math Library, containing functions like cos, sine etc










