[PATCH] D46653: Start support for linking object files with split stacks

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 11:09:43 PDT 2018


MaskRay added inline comments.


================
Comment at: ELF/InputSection.cpp:890
+    // Ignore calls into the split-stack api.
+    if (D->getName().startswith("__morestack")) {
+      if (D->getName().equals("__morestack"))
----------------
ruiu wrote:
> What else symbol can start with `__morestack`? Is this documented?
```
% ar x /usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a morestack.o 
% llvm-nm -U morestack.o | grep morestack
0000000000000037 T __morestack
0000000000000159 T __morestack_get_guard
000000000000011c T __morestack_large_model
000000000000016d T __morestack_make_guard
0000000000000000 T __morestack_non_split
0000000000000163 T __morestack_set_guard
```

`generic-morestack.o` in `libgcc.a` also defines some `__morestack_*` functions. I'm not sure whether they are related.


================
Comment at: ELF/InputSection.cpp:900
+    if (D->Type != STT_FUNC)
+      continue;
+    InputSection *IS = dyn_cast_or_null<InputSection>(D->Section);
----------------
grimar wrote:
> The same - untested.
Not related to the revision. Are you using `-fprofile-arcs -ftest-coverage` + `llvm-cov` (http://lists.llvm.org/pipermail/llvm-dev/2018-April/122782.html) to collect coverage information?


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46653





More information about the llvm-commits mailing list