This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: crossgcc: arbitrary sections?


/usr/local/crosscompiler/crossgcc$ cat test.c
char foobar __attribute__ ((section ("bar")));
/usr/local/crosscompiler/crossgcc$ m68k-coff-gcc test.c
test.c:1: section attributes are not supported for this target
/usr/local/crosscompiler/crossgcc$ m68k-coff-gcc -S test.c
test.c:1: section attributes are not supported for this target
/usr/local/crosscompiler/crossgcc$

This can be fixed by declaring ASM_OUTPUT_SECTION_NAME somewhere in
the config header file for your target. The COFF file format can handle
the names fine, it's just that noone has added the support in gcc.

Another alternative is to place all your "bar" section variables in a
file and use a linker script to direct them to the desired output section.
The disadvantage of this is that it is file granularity.
-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."