[PATCH] D55293: [LLD][COFF] Partial sections

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 09:51:58 PST 2019


aganea added inline comments.


================
Comment at: COFF/Writer.cpp:701-702
   // Try to match the section order used by link.exe.
-  TextSec = CreateSection(".text", CODE | R | X);
-  CreateSection(".bss", BSS | R | W);
-  RdataSec = CreateSection(".rdata", DATA | R);
-  BuildidSec = CreateSection(".buildid", DATA | R);
-  DataSec = CreateSection(".data", DATA | R | W);
-  PdataSec = CreateSection(".pdata", DATA | R);
-  IdataSec = CreateSection(".idata", DATA | R);
-  EdataSec = CreateSection(".edata", DATA | R);
-  DidatSec = CreateSection(".didat", DATA | R);
-  RsrcSec = CreateSection(".rsrc", DATA | R);
-  RelocSec = CreateSection(".reloc", DATA | DISCARDABLE | R);
-  CtorsSec = CreateSection(".ctors", DATA | R | W);
-  DtorsSec = CreateSection(".dtors", DATA | R | W);
+  TextSec = CreateOutSection(".text", CODE | R | X);
+  CreateOutSection(".bss", BSS | R | W);
+  RdataSec = CreateOutSection(".rdata", DATA | R);
----------------
ruiu wrote:
> Why did you have to rename the function?
Reverted.


================
Comment at: COFF/Writer.h:30
+// output file, including synthetic ones.
+class UnmergedSection {
+public:
----------------
ruiu wrote:
> It feels that UnmergedSection is still a bit weird name. You don't remove members from "Unmerged" once they are "merged" right?
What about `PartialSection`?


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D55293





More information about the llvm-commits mailing list