1. Overview I'm compiling an embedded project for e5xx powerpc system (-m505). When trying to consolidate all variables into the small data sections (-msdata=eabi -G 26000), I'm always receiving an aforementioned warning (assembler warning: Setting incorrect section attributes) for every file containing global "const" variables. This happens, apparently, because gcc sets ".sdata2" section attributes to "aw" (and assembler dislikes this). I took the intermediate assembler files produced by gcc (with -S option) and changed manually the ".sdata2" section attribute to "a". This made the warnings go (on the "as" stage). However, I strongly suspect that this is not a desired behaviour. The program links and works as expected (with all references to "sdata2" area based on "r2" register). 2. Steps to reproduce Compile a "c" file containing global const variable (some string, for example: const char tryme[]="bababa";) with a "powerpc-eabi-gcc -msdata=eabi -G 26000 -c" to push a variable into the "sdata2" area. 3. Actual results Assembler warning. 3. Expected results No warnings about section attributes.
This is a dup of bug 9571. *** This bug has been marked as a duplicate of 9571 ***