<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>symbol declaration, for an C structure element</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/17051/symbol-declaration-for-an-c-structure-element</link><description> If we define 
 
struct _footype { 
 char c; 
 int x; 
} foo; 
 
foo would be a linkable symbol, being th aderess of real memory - of sizeof(struct _footype) 
 
What can I do to declare a linkable symbol for x, the integer? </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: symbol declaration, for an C structure element</title><link>https://community.arm.com/thread/42563?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2004 14:56:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:17145b85-74ef-4674-a369-161ecd86ac1f</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;Just plain &amp;quot;int x;&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
The point of the structure is to group related items.  You would refer to x as &amp;quot;foo.x&amp;quot;.  Other modules referencing this data presumably understand the structure as well.  In assembler, for example, you&amp;#39;d probably wind up defined a bunch of constants for the offsets of the fields in the structure.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;foo.x gives you the address.  There&amp;#39;s also the offsetof() macro.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m not really sure what your actual goal is here.  I don&amp;#39;t think you can get the linker to emit a symbol for &amp;quot;x&amp;quot;, since there is no symbol x without foo.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>