This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37506] attribute section is not working with constant strings
- From: "brian at dessent dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2008 07:54:45 -0000
- Subject: [Bug c/37506] attribute section is not working with constant strings
- References: <bug-37506-16706@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from brian at dessent dot net 2008-09-14 07:54 -------
Subject: Re: attribute section is not working with constant strings
If you want a struct containing a pointer to a string in a specified
section, then:
char str[] __attribute__ ((__section__(".xxx_section"))) = "foo";
struct foo {
char *p
} var = { str };
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37506