[PATCH] D115775: [lld-macho] Handle $ld$hide[$os] symbols.

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 13:13:16 PST 2021


int3 added inline comments.


================
Comment at: lld/test/MachO/special-symbol-ld-hidden.s:24-27
+.long	_xxx at GOTPCREL
+.long _OBJC_CLASS_$_foo11 at GOTPCREL
+.long _OBJC_CLASS_$_foo10 at GOTPCREL
+.long _OBJC_CLASS_$_bar at GOTPCREL
----------------
oontvoo wrote:
> int3 wrote:
> > oontvoo wrote:
> > > int3 wrote:
> > > > shouldn't this be `.quad`? I believe `.long` is for 32-bit values
> > >  it needed to be 32-bit because of the @GOTPCREL
> > > 
> > oh right. it's weird to use GOTPCREL like this though, since this isn't actually an instruction stream. I think `.quad _xxx` makes more sense if you just want to add a reference to a symbol
> > 
> > most of our other tests do that too
> also can't use `.quad` because `objdump` will crash with 
> 
> ```
> objdump: error: ': truncated or malformed object (for BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB bad offset, not in section for opcode at: 0xa)
> ```
> 
> :(
weird. can you look at the other tests that use quad to figure out the difference?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115775



More information about the llvm-commits mailing list