https://bugs.llvm.org/show_bug.cgi?id=50085
Bug ID: 50085
Summary: Erroneous warning: section 'X' mentioned in a
-j/--section option, but not found in any input file
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-objdump
Assignee: unassignedb...@nondot.org
Reporter: ruppre...@google.com
CC: llvm-bugs@lists.llvm.org
Found in https://github.com/ClangBuiltLinux/linux/issues/859.
$ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs