* How to get address and size of a section
@ 2006-09-30 5:36 LUO Sai
0 siblings, 0 replies; only message in thread
From: LUO Sai @ 2006-09-30 5:36 UTC (permalink / raw)
To: gcc-help
Hi all.
Does anyone know how to get the address and size of a section in gcc
in a somewhat portable way without using linking script? I mean
portable because I want to compile the program using icc(intel c
compiler) too.
for example.
int a __attribute__(section(".extra")) = 1;
int b __attribute__(section(".extra")) = 2;
int c __attribute__(section(".extra")) = 3;
Does gcc provides any directive to get the address and size of
".extra" section, or is inline assembly available? I want to access
variables in ".extra" section in batches. And can I specify the layout
of the section that a is laid before b, and b before c, that's,
&a+1==&b and &b+1==&c ?
--
Sai.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-30 5:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-30 5:36 How to get address and size of a section LUO Sai
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).