[Bug c/13646] New: Obscure assembler warning "Setting incorrect section attributes"
oakad at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 11 14:45:00 GMT 2004
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.
--
Summary: Obscure assembler warning "Setting incorrect section
attributes"
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oakad at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: powerpc-*-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13646
More information about the Gcc-bugs
mailing list