UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 29380

11.1 EDK - GCC 4.1.1 Support for PowerPC

Description

What are some of the issues when using GCC 4.1.1 for PowerPC?

Solution

PowerPC Binutils

- powerpc-eabi-strip might garble executables, which can result in a larger file. No methods by which to work around this issue are known.

- The new C++ compiler creates sections with names such as .sdata*.*. Linker scripts generated by BSB, and other tools in EDK 8.2i and earlier, do not have section assignments for such sections and, consequently, do not correctly assign these new sections. Rev-up automatically updates linker scripts and adds the missing section assignments.

- powerpc-eabi-objdump -S does not intermingle source and assembly in the disassembly. You can use one of the following to work around this issue:

-- Invoke powerpc-eabi-objdump from the directory in which the sources are contained.

-- Compile the application using -gstabs. However, this option is not recommended as it could affect debug.

PowerPC GCC

- Compiler generates new warnings for built in functions that are used without the appropriate header file included (e.g., memcpy, printf). To eliminate the warning, the appropriate header file must be added to the list of includes.

- Support for generalized lvalues have been removed in GCC-4.1.1 according to the C standard. The following type of code should be changed as follows:

From:

(char *) var = "STRING";

To:

var = (char *) "STRING";

PowerPC Newlib

- atexit () supports registration for a maximum of only 32 exit functions. This prevents unnecessary code bloat in programs that do not use atexit(). Also, the C standard requires only 32 exit functions to be supported by atexit ().

AR# 29380
Date Created 10/28/2007
Last Updated 12/15/2012
Status Active
Type General Article