* How to change the default attributes of sections declared with __attribute__(( section("my-section") ))?
@ 2008-03-12 3:46 PRC
2008-03-12 5:26 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: PRC @ 2008-03-12 3:46 UTC (permalink / raw)
To: gcc-help
a.c
-----------------------------
static char mydata1[0x2000] __attribute__(( section(".1.c") )) ;
mips-elf-objdump -h a.o
-----------------------------
...
9 .1.c 00002000 00000000 00000000 00000210 2**2
CONTENTS, ALLOC, LOAD, DATA
...
Can I change it to only `ALLOC', without using any `binutils' tool?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to change the default attributes of sections declared with __attribute__(( section("my-section") ))?
2008-03-12 3:46 How to change the default attributes of sections declared with __attribute__(( section("my-section") ))? PRC
@ 2008-03-12 5:26 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2008-03-12 5:26 UTC (permalink / raw)
To: PRC; +Cc: gcc-help
"PRC" <panruochen@gmail.com> writes:
> a.c
> -----------------------------
> static char mydata1[0x2000] __attribute__(( section(".1.c") )) ;
>
> mips-elf-objdump -h a.o
> -----------------------------
> ...
> 9 .1.c 00002000 00000000 00000000 00000210 2**2
> CONTENTS, ALLOC, LOAD, DATA
> ...
>
> Can I change it to only `ALLOC', without using any `binutils' tool?
You mean: treat it like a .bss section? No, gcc doesn't support that
with the attribute syntax.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-12 5:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12 3:46 How to change the default attributes of sections declared with __attribute__(( section("my-section") ))? PRC
2008-03-12 5:26 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).