[PATCH] D123435: [lld-macho] Initial support for EH Frames

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 07:46:56 PDT 2022


oontvoo added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:1188
+  Defined *target =
+      cast_or_null<Defined>(minuend.referent.dyn_cast<macho::Symbol *>());
+  if (!pcSym) {
----------------
int3 wrote:
> it appears that this cast is asserting when running on `obj-file-with-stabs.yaml`. Unfortunately it's a bit hard to debug when we only have the yaml without the source that generated it originally. @oontvoo do you happen to have a link to the original source of that file?
Yes - this was produced with the following:

```
echo "int main() {return 1;}" > test.cc
clang -c -g -o test.o test.c
ld -r -o test2.o test.o;
```

The trick is `ld -r` which kept the debug stuff (stabs) in the output `.o` file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123435



More information about the llvm-commits mailing list