help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: special_keyword or patch


From: Ulrich Eckhardt
Subject: Re: special_keyword or patch
Date: Mon, 03 Jan 2005 10:13:11 +0100
User-agent: KNode/0.7.7

chetan wrote:
> Can anyone specify me patch to get following things done .
> 
> class special_keyword class name {
> 
> private:
> 
> public:
> char var1;
> float var2;
> int func1();
> int func2();
> };
> 
> By writing that special_keyword in the definition of the class can it
> be possible to put all public members of the class in the particular
> section of the binary or object file?

No. A class definition does not create any instances of that class. You
might be able to force memberfunctions (just the functions!) into a
certain section by embedding assembly statements into the sourcecode
(probably not the class definition, I imagine something like asm(".section
text") or so), but if and how that works strongly depends on your
particular system.

> Or
> Is it distinguish public symbols of the class with special_keyword and
> public  members of the class without such keyword ?
> 
> I already have that visibility(__attribute__("defaults")) patch but
> that has to specify the attribute => visibility for every symbol whose
> visibility in the symbol table is to changed. That was'nt worked
> against any data types like definition of class etc.

I wonder what you are trying to do. It might help a lot if you were not
asking for one particular solution (and, without offence, your English
makes it even harder to understand) but rather described the problem you
are trying to solve.

Uli

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]