[llvm] [llvm-objdump] Add preliminary support for decoding binary files (PR #115667)
Michael Clark via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 13:59:20 PST 2024
================
@@ -1870,7 +1877,6 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
if (FilterSections.empty() && !DisassembleAll &&
(!Section.isText() || Section.isVirtual()))
continue;
-
----------------
michaeljclark wrote:
jh,
I am fine with most of the changes you suggested except for command-line compatibility with GNU objdump. the reasoning is we want to be consistent with `--triple` and if we implement `-b` as per GNU then you have now widened the scope of this patch to add manual detection for file tables formats with "well defined" labels in their magic. I have never found the need to specify a file type for a file that already has file magic. I like `-b` and `--binary`. but it's your call.
although I especially agree with reinstating blank lines which is why I am replying here. I guess I can't blame `clang-format-diff.py,` for this but I don't remember seeing this although my cursor was definitely there. :smile:
I don't have time right now to go through a respin with the rename or to add tests because I have moved on to something else. I can return to this when I have free time. I started off with Raw but didn't like the sound of it so I went back to Binary after I discovered that BinaryObjectFile didn't clash with BinaryFile. In fact I think BinaryFile should be the one to change because it is the most vague and has relatively few references. Binary Artefact sounds better because it is an output that can be used as input. RawBinary is acceptable for this but if all possible I would vote for a name without Raw in it because it aliases with a word from nature, although I used it once in the if statement so that it is unambiguous there but I think once is enough. Your call.
if you beat me to it, I will close this PR. I've added a Signed-off-by to the commit and reinstated the blank line. the main point of the PR is so that the search engine picks up the search terms so that next version of me can pull a patch shared as a PR.
thanks, michael.
https://github.com/llvm/llvm-project/pull/115667
More information about the llvm-commits
mailing list