global objects in C++
<p>In the following C++ code, where is s allocated?  Does it use heap, data, bss, or some combination?  I'm on a Linux/x86 platform in case that makes a difference.  Is there a way to have the g++ compiler show me the layout?</p>

<pre><code>#include &lt;string&gt;
#include &lt;iostream&gt;

using namespace std;

string s;

int main()
{
    s = "test";
    cout &lt;&lt; s;
}
</code></pre>
