[PATCH] D31255: Force @{init, fini}_array if section name starts with ".{init, fini}_array.".
Gustaw Smolarczyk via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 15:43:07 PDT 2017
gsmolarczyk accepted this revision.
gsmolarczyk added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/ELF/InputSection.cpp:78
+// result, the following assembler directive creates ".init_array.100"
+// with SHT_PROGBITS, while it should be SHF_INIT_ARRAY, for example.
+//
----------------
SHT_INIT_ARRAY
================
Comment at: lld/ELF/InputSection.cpp:88
+ if (Type == SHT_PROGBITS && Name.startswith(".fini_array."))
+ return SHT_FINI_ARRAY;
+ return Type;
----------------
How about folding if (Type == SHT_PROGBITS) into outer if instruction?
https://reviews.llvm.org/D31255
More information about the llvm-commits
mailing list