[PATCH] D132560: [lld-macho] Add initial support for chained fixups

Daniel Bertalan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 23:47:11 PDT 2022


BertalanD marked 2 inline comments as done.
BertalanD added inline comments.


================
Comment at: lld/test/MachO/chained-fixups-addend.s:14
+# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out
+# RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \
+# RUN:     FileCheck %s -D#OUTLINE=0 -D#ADDEND=0 -D#%x,REBASE=0x1000 --check-prefixes=IMPORT,COMMON
----------------
thakis wrote:
> BertalanD wrote:
> > thakis wrote:
> > > I just noticed that `otool -chained_fixups -dyld_info a.out` prints dyld_info output before chained_fixups output. We should probably change llvm-otool to match (and then update this test – looks like that should be doable?)
> > I believe the symbol table should also come before either of these. It would simplify the flat-namespace-interposable test. Could we also fix that in D132865? 
> Do you mean `-I` output? That's already before the two others. Do you mean `--syms` output? That doesn't have an otool equivalent, so we can't match otool's order there (which D132865 is about).
> 
> Sorry, I'm not sure what you mean. I'm guessing you mean "It'd be convenient if objdump --syms output was before --chained-fixups and --dyld-info output". If so, sure go for it, but imho it doesn't belong in a patch that makes output consistent with otool. (…at least I think there's no way to trigger --syms output via llvm-otool?)
What I meant to write (and spectacularly failed to do so) is that `llvm-objdump --macho --syms --dyld-info` should print the symbol table before the fixups just like it puts the symbol table before `--bind` or `--rebase`, for consistency. Not sure where I got the idea about Apple otool being like this. Anyway, I agree that I should put it up as a separate patch then.


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

https://reviews.llvm.org/D132560



More information about the llvm-commits mailing list