Skip to content

Instantly share code, notes, and snippets.

@linzj
Created January 11, 2024 23:57
Show Gist options
  • Select an option

  • Save linzj/f27d39c74d115028cbafc9056bb50437 to your computer and use it in GitHub Desktop.

Select an option

Save linzj/f27d39c74d115028cbafc9056bb50437 to your computer and use it in GitHub Desktop.
patch llvm objdump so that -D will emit full code not data
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 9979a26cf115..1b0fd9414088 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -1754,7 +1754,7 @@ static void disassembleObject(const Target *TheTarget, ObjectFile &Obj,
// denoted as a word/short etc.
if (!MappingSymbols.empty()) {
char Kind = getMappingSymbolKind(MappingSymbols, Index);
- DumpARMELFData = Kind == 'd';
+ DumpARMELFData = !DisassembleAll && Kind == 'd';
if (SecondarySTI) {
if (Kind == 'a') {
STI = PrimaryIsThumb ? SecondarySTI : PrimarySTI;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment