This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/37506] attribute section is not working with constant strings



------- 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


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