<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br>On Sun, Jan 13, 2013 at 12:09 PM, horseriver &lt;<a href="mailto:horserivers@gmail.com">horserivers@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:<br>
&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; On Sun, Jan 13, 2013 at 11:29 AM, horseriver &lt;<a href="mailto:horserivers@gmail.com">horserivers@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; hi:<br>&gt; &gt; &gt;<br>
&gt; &gt; &gt;   In kernel code . some function is defined  by<br>&gt; &gt;  __attribute__((__section__(&quot;.initcall&quot; level &quot;.init&quot;)))<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;   what does this do ?<br>&gt; &gt;<br>
&gt; &gt; It puts the address of the function in a linker section named<br>&gt; &gt; .initcallX.init where X is replaced by the level.<br>&gt;<br>&gt;    why &quot;.initcall&quot; and level do not connect  together with ## ?<br>
&gt;    As I know , precompiler use ## to connect two strings<br><br><br></div>That&#39;s not quite true. ## is the token pasting operator and is for pasting together pieces of a token to create a larger token.<br><a href="http://gcc.gnu.org/onlinedocs/cpp/Concatenation.html">http://gcc.gnu.org/onlinedocs/cpp/Concatenation.html</a><br>
<br></div>If you have the tokens someVar_  and somethingElse you could token paste them together to make someVar_somethingElse<br><br></div>The # operator is a for stringizing,which converts non-strings into strings.<br><a href="http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification">http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification</a><br>
<br></div>In C and C++ you can &quot;paste&quot; strings together by just putting them one after the  other.<br><br></div>const char *x = &quot;This is a long string.&quot;;<br><br></div>is 100% identical to<br><br></div>
const char *x = &quot;This&quot;     &quot; is a long &quot;    &quot;string.&quot;;<br><a href="http://en.wikipedia.org/wiki/C_syntax#String_literal_concatenation">http://en.wikipedia.org/wiki/C_syntax#String_literal_concatenation</a><br>
<div><div><div><div><div><div><div><div><br>--<br>Dave Hylands<br>Shuswap, BC, Canada<br><a href="http://www.davehylands.com">http://www.davehylands.com</a></div></div></div></div></div></div></div></div></div>