[PATCH] D84131: [ELF] Support -r --gc-sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 19 15:03:32 PDT 2020


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: lld/test/ELF/relocatable-gc.s:26
+# RUN:   FileCheck %s --check-prefix=KEEP_GROUP
+# RUN: ld.lld -r --gc-sections --init=bar %t.o -o - | llvm-readelf -Ss - | \
+# RUN:   FileCheck %s --check-prefix=KEEP_GROUP
----------------
Note that GNU ld will error if neither -e nor -u is specified, although --init can serve as GC roots as well.

I don't find the GNU ld error particularly useful, so I just don't bother implementing it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84131





More information about the llvm-commits mailing list