linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Listing special marked symbols - attribute section
@ 2007-05-03  9:01 Thomas Schmid
  2007-05-03 22:37 ` Chris Li
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schmid @ 2007-05-03  9:01 UTC (permalink / raw)
  To: linux-sparse

Hi,

i want to use sparse to put out a list of symbols, which are declared with 
__attribute__((section(<sectionname>))),
where <sectionname> maybe either ".gio" or ".lio".

E.g.:
__attribute__((__section__(".gio"))) int gInt;

In 0.3 are several extensions to parse attributes, but it seems that 
<sectionname> isn't stored anywhere.
Is it possible to get <sectionname>? 

If there is no way to get <sectionname> in the actual implementation, i 
think of an extension in struct ctype.
Any comments?
Would this be useful for someone else?

Best regards
Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Listing special marked symbols - attribute section
  2007-05-03  9:01 Listing special marked symbols - attribute section Thomas Schmid
@ 2007-05-03 22:37 ` Chris Li
  2007-05-04 13:08   ` Antwort: " Thomas Schmid
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Li @ 2007-05-03 22:37 UTC (permalink / raw)
  To: Thomas Schmid; +Cc: linux-sparse

On 5/3/07, Thomas Schmid <Thomas.Schmid@br-automation.com> wrote:
> In 0.3 are several extensions to parse attributes, but it seems that
> <sectionname> isn't stored anywhere.
> Is it possible to get <sectionname>?
>
> If there is no way to get <sectionname> in the actual implementation, i
> think of an extension in struct ctype.
> Any comments?
> Would this be useful for someone else?

Yes, it would be useful. The easiest way is just increase the ctype to include
a pointer to section name. The biggest objection is from the fact that
symbol/ctype
is the most common data structure in the sparse. If we increase the size
of ctype, there is a huge impact of the sparse memory usage.

I did try to use some kind of extend the attributes. The idea is have
the most common
attribute embed in ctype. The not common ones will store in a extend
attribute structure.
The extend attribute structure itself is flat. The initial
implementation will only contain
address space and context. I found myself keep breaking the existing
address space
attributes.

The attribute propagation not very clear in sparse. Some times we use assignment
and some times the attribute is inherited from implicit memcpy and
some time we strip
the attribute out. I wish to have a more unify way to define how
attribute are created
and propagate through the ctype, maybe a table or some thing.

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Antwort: Re: Listing special marked symbols - attribute section
  2007-05-03 22:37 ` Chris Li
@ 2007-05-04 13:08   ` Thomas Schmid
  2007-05-04 18:29     ` Christopher Li
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schmid @ 2007-05-04 13:08 UTC (permalink / raw)
  To: Chris Li; +Cc: linux-sparse

linux-sparse-owner@vger.kernel.org schrieb am 04.05.2007 00:37:17:

> The extend attribute structure itself is flat. The initial
> implementation will only contain
> address space and context. 

A little bit offtopic: Because attribute section is ignored, i tried to 
mis-use attribute context (dirty, i know).
I tried to find out the meaning of attribute context - but i couldn't.
What is its purpose?

Best regards
Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Listing special marked symbols - attribute section
  2007-05-04 13:08   ` Antwort: " Thomas Schmid
@ 2007-05-04 18:29     ` Christopher Li
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Li @ 2007-05-04 18:29 UTC (permalink / raw)
  To: Thomas Schmid; +Cc: linux-sparse

On 5/4/07, Thomas Schmid <Thomas.Schmid@br-automation.com> wrote:
> A little bit offtopic: Because attribute section is ignored, i tried to
> mis-use attribute context (dirty, i know).
> I tried to find out the meaning of attribute context - but i couldn't.
> What is its purpose?

If you want to do some quick and dirty hack. I suggest you just add your
section attribute as a new member.

The context attribute is used for declare function which has impact on the
context counting. e.g. from compiler.h:

# define __acquires(x)  __attribute__((context(x,0,1)))
# define __releases(x)  __attribute__((context(x,1,0)))

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-04 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-03  9:01 Listing special marked symbols - attribute section Thomas Schmid
2007-05-03 22:37 ` Chris Li
2007-05-04 13:08   ` Antwort: " Thomas Schmid
2007-05-04 18:29     ` Christopher Li

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 NNTP newsgroup(s).