title: Weak linkage with inline assembly
body: <p>I'm trying to use <code>weak</code> symbol attributes of <code>ELF</code> format with inline assembly. When I try to use <code>.weak</code> assembly directive, assembly output contains both <code>.weak</code> and <code>.global</code> directives.</p>
  
  <p><strong>foo.c</strong></p>
  
  <pre><code>__asm(".weak foo");
  void foo(void)
  {
      /* EMPTY FUNCTION! */
  }
  </code></pre>
  
  <p><strong>foo.s</strong></p>
  
  <pre><code>#APP
      .weak foo
  #NO_APP
      .global foo
  </code></pre>
  
  <p>The code is working fine; but in this case, when the linker sees the symbol both global and weak, could it cause any problem?</p>