<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 - Should --weaken-symbol(s) be prevented from marking undef globals as weak?"
   href="https://bugs.llvm.org/show_bug.cgi?id=49362">49362</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Should --weaken-symbol(s) be prevented from marking undef globals as weak?
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>llvm-objcopy/strip
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>alexander.v.shaposhnikov@gmail.com, jake.h.ehrlich@gmail.com, jh7370.2008@my.bristol.ac.uk, llvm-bugs@lists.llvm.org, rupprecht@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>GNU objcopy --weaken-symbol does not change mentioned symbols to STB_WEAK
binding if they are undefined. This means --weaken-symbol=globalundef will do
nothing. For llvm-objcopy, if a symbol is explicitly requested by
--weaken-symbol it goes ahead with it, even for undefined symbols. This seems
like a reasonable thing to do on the surface - the user has asked to do
something so we should let them (plus there's no other way to convert a global
undef to a weak). However, it gets more complicated when you consider
interactions with --regex and --wildcard: it a user specifies
--weaken-symbol=.*, should it change weak undefined symbols? If there are any
undefined symbols, they'll become weak undefined symbols, which means there may
be problems at link time.

What do people think? I'm inclined to leave this difference in place, but am
happy to here the opinions of others.</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>