<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wasm_export on symbol with external name linkage isn't preserved"
   href="https://bugs.llvm.org/show_bug.cgi?id=45522">45522</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>wasm_export on symbol with external name linkage isn't preserved
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>wasm
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dan433584@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, sbc@chromium.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compiling this program (with wasm32-wasi for stdio.h, but the bug isn't
specific to WASI):

#include <stdio.h>

__attribute__((export_name("yellow")))
static void green(void) {
    printf("hello green, exported as yellow\n");
}

int main(void) {
    return 0;
}

produces an executable which doesn't export "yellow".

I expected this to mean that the C symbol "green" is internal, so it can't be
directly linked to from other C files, but that it's treated as live through
the linker and exported from the resulting wasm module as "yellow". Is that
reasonable?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>