[PATCH] D60628: [LLD] [COFF] Link crtend.o as the last object file

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 14 23:31:05 PDT 2019


mstorsjo added a comment.

In D60628#1466020 <https://reviews.llvm.org/D60628#1466020>, @ruiu wrote:

> This patches changes the order how input files are parsed. The other approach is to parse input files normally and then sort the list of object files so that crtend.o is at the end of the input list. I wonder if the latter is simpler. What do you think?


I initially thought about something like that (although I mostly thought about sorting SectionChunks even later in the pipeline). My main concern was that one would end up doing a huge std::stable_sort over O(N) entries, when all I want to do is move one single entry to the end.

But I can give that a try, out of curiosity.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D60628





More information about the llvm-commits mailing list