[PATCH] D76668: [lld][ELF] Ignore __start/__stop symbols in section groups during GC

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 23:57:53 PDT 2020


ruiu added a comment.

Although I understand your concrete example, I'm not sure if this is logically correct. This patch is written based on the following assumption:

1. Data sections (e.g. _llvm_prf_data) in a section group contain auxiliary data for a function in the same section
2. If the function gets linked, we need the auxiliary data. Otherwise, we don't.

It looks like the above assumption is too specific to one use case and might have some unexpected side effects.

That being said, section garbage collection isn't defined by the spec and we can do whatever we think reasonable. If this is what GNU linkers are already doing, doing the same thing shouldn't cause too much trouble. Could you point out the code location where GNU linker does this process?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76668





More information about the llvm-commits mailing list