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

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 10:39:56 PDT 2022


keith added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/MachO/chained-fixups.yaml:79
+    flags:           0
+  - cmd:             LC_DYLD_CHAINED_FIXUPS
+    cmdsize:         16
----------------
thakis wrote:
> thakis wrote:
> > thakis wrote:
> > > 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.)
> > (The invalid data is because this uses `LinkEditData` instead of `__LINKEDIT`, and the former doesn't currently contain the chained fixups information.)
> (Changed the yaml data in D131890 – lmk if you'd rather have a different change done to it.)
Yea this fixture at the time this landed was just about making sure the load command was handled at all. I think my hope at the time was that I could make it more valid after https://reviews.llvm.org/D119671 landed. So I didn't care about encoding the specific data yet


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