[PATCH] D76742: [lld] Add basic symbol table output

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 20:09:39 PDT 2020


ruiu added a comment.

We usually construct a section in three phases as follows:

1. In the first phase, we add pieces of information to each section object (e.g. adding symbols to the symbol table section object), but we don't construct the actual contents at this stage. We only compute the size of each section.
2. We fix the layout of the output file, which can be done once we know the size of each section.
3. Finally, we let each section to write their contents directly to the output buffer.

This design has several advantages over constructing section contents early:

- This last phase can be parallelized for each section, which significantly improves performance of the writer.
- As we directly construct section contents to the output buffer, we can avoid an extra copy.

My understanding of this patch is that this creates section contents early. But can you avoid doing that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76742





More information about the llvm-commits mailing list