<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 - Erroneous warning: section 'X' mentioned in a -j/--section option, but not found in any input file"
   href="https://bugs.llvm.org/show_bug.cgi?id=50085">50085</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Erroneous warning: section 'X' mentioned in a -j/--section option, but not found in any input file
          </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>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>llvm-objdump
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rupprecht@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Found in <a href="https://github.com/ClangBuiltLinux/linux/issues/859">https://github.com/ClangBuiltLinux/linux/issues/859</a>.

$ bin/clang -xc -c /dev/null -o /tmp/null.o
$ bin/llvm-objdump -j .text -h /tmp/null.o  # -j and -h work fine

/tmp/null.o:    file format elf64-x86-64

Sections:
Idx Name          Size     VMA              Type
  2 .text         00000000 0000000000000000 TEXT
$ bin/llvm-objdump -j .text -t /tmp/null.o  # -j and -t don't work fine

/tmp/null.o:    file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 null
bin/llvm-objdump: warning: section '.text' mentioned in a -j/--section option,
but not found in any input file

The warning for -j should only fire for options (like -h) that iterate over
sections. For -t (printing the symbol table), we shouldn't print the warning,
even though we never "saw" the section we're looking for (... because we
*didn't* iterate over any sections).

The error is misleading -- either we should omit it, or we should notify the
user more directly that -j is not applicable for flags like -t.

GNU objdump prints the same warning for the repro above, but I think they would
consider it a bug too.</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>