--- 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";
--- Comment #6 from nm127 at freemail dot hu 2008-09-14 07:14 ---
(In reply to comment #5)
> This is all expected, if you want a string constant to be in a different
> section, you need to put there your self by using a variable.
So the __attribute__ __section__ modifier is not recursiv
--- Comment #5 from pinskia at gcc dot gnu dot org 2008-09-14 05:36 ---
This is all expected, if you want a string constant to be in a different
section, you need to put there your self by using a variable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37506
--- Comment #4 from nm127 at freemail dot hu 2008-09-14 05:32 ---
(In reply to comment #3)
> char* y __attribute__ ((__section__(".xxx_section"))) = "Hello World!";
>
> That only puts the pointer variable y into that section and not the string.
Exatly that is my problem. So the pointe
--- Comment #3 from pinskia at gcc dot gnu dot org 2008-09-14 04:45 ---
char* y __attribute__ ((__section__(".xxx_section"))) = "Hello World!";
That only puts the pointer variable y into that section and not the string.
The correct way is do like what you do for x.
--
pinskia at gc
--- Comment #2 from nm127 at freemail dot hu 2008-09-13 13:59 ---
This problem maybe related to bug #192.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37506
--- Comment #1 from pinskia at gmail dot com 2008-09-13 09:49 ---
Subject: Re: New: attribute section is not working with constant strings
Sent from my iPhone
On Sep 13, 2008, at 2:04 AM, "nm127 at freemail dot hu"
<[EMAIL PROTECTED]
> wrote:
> With the __attribute__ __section__