Bug 13646 - Obscure assembler warning "Setting incorrect section attributes"
Summary: Obscure assembler warning "Setting incorrect section attributes"
Status: RESOLVED DUPLICATE of bug 9571
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-11 14:45 UTC by Alexander Dubov
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: powerpc-*-eabi
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Dubov 2004-01-11 14:45:12 UTC
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.
Comment 1 Andrew Pinski 2004-01-11 15:59:28 UTC
This is a dup of bug 9571.

*** This bug has been marked as a duplicate of 9571 ***