You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ 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.
The text was updated successfully, but these errors were encountered:
Extended Description
Found in ClangBuiltLinux/linux#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.
The text was updated successfully, but these errors were encountered: