Empty sections with gcc4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

So far we worked with gcc 2.95.2 (I know, ancient) for our embedded target.
We now would like to go to gcc4, that's why I'm testing compiling, running,
debugging etc.

We put some stuff in separate sections like this (example code):

#define STRUCT_NAM __attribute__ ((section (".struct_nam")))
STRUCT_NAM static char aTableName[] = "TableName";
or
static char aTableName[] STRUCT_NAM = "TableName";

This works fine with the old compiler, but with gcc 4.1.0, cross-compiled
for ppc-eabi, these sections are empty.

old:
.struct_nam     0x00149304     0x1648

new:
.struct_nam     0x000b5a70       0x14

This is with the same sources, same commands, same linker script,
just different compiler and binutils.

How can this happen? Or how can I find out where this stuff goes to
if not here? Looking at the docs it should still work this way:

http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Variable-Attributes.html#Variable-Attributes

Thanks

bye  Fabi



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux