[PATCH] D52749: [LLD][COFF] Fix ordering of CRT global initializers in COMDAT sections

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 13:28:14 PDT 2018


aganea updated this revision to Diff 168008.
aganea marked 11 inline comments as done.
aganea added a comment.

Addressed all comments. Added more /verbose logging for sections, which also prints the CRT initializers. Extended the test, as requested by @mstorsjo.

Also added tests to show that arbitrary OBJ ordering on the command-line does not affect the layout of CRT section(s). This is a **breaking change** from the previous behavior of LLD. Please let me know if we should go ahead with that, or if I should retain the previous TUs ordering (which was previously dependent on both the OBJs order on the command-line, and the contents of said OBJs).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52749

Files:
  COFF/Chunks.cpp
  COFF/Chunks.h
  COFF/Writer.cpp
  test/COFF/Inputs/crt-dyn-initializer-order_1.yaml
  test/COFF/Inputs/crt-dyn-initializer-order_2.yaml
  test/COFF/crt-dyn-initializer-order.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52749.168008.patch
Type: text/x-patch
Size: 9632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181002/a5f1446c/attachment.bin>


More information about the llvm-commits mailing list