[PATCH] D113733: [llvm-objdump/mac] Add support for new load commands

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 06:49:19 PDT 2022


thakis added inline comments.
Herald added a subscriber: StephenFan.
Herald added a project: All.


================
Comment at: llvm/test/tools/llvm-objdump/MachO/chained-fixups.yaml:79
+    flags:           0
+  - cmd:             LC_DYLD_CHAINED_FIXUPS
+    cmdsize:         16
----------------
How did you create this file? It looks like this load command contains dummy data:

```
 % otool -chained_fixups /Users/thakis/src/llvm-project/out/gn/obj/llvm/test/tools/llvm-objdump/MachO/Output/chained-fixups.yaml.tmp
/Users/thakis/src/llvm-project/out/gn/obj/llvm/test/tools/llvm-objdump/MachO/Output/chained-fixups.yaml.tmp:
chained fixups header (LC_DYLD_CHAINED_FIXUPS)
  fixups_version = 0
  starts_offset  = 0
  imports_offset = 0
  symbols_offset = 0
  imports_count  = 0
  imports_format = 0
  symbols_format = 0
chained starts in image
  seg_count = 0
```

(I noticed 'cause I'm trying to implement `llvm-otool -chained_fixups`, and the validation code added in D113630 complains that this chained fixups load command contains dummy data. So I'd like to regenerate the test input with valid data, ideally using the same command you used.

Generally, it's imho a good idea to put in a comment how a file like this was generated.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113733/new/

https://reviews.llvm.org/D113733



More information about the llvm-commits mailing list