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

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 13:10:42 PST 2021


oontvoo 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
----------------
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)
```

:(


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