[PATCH] D22811: [ELF] Linkerscript: allow setting custom output section for common symbols, instead of .bss
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 13:40:16 PDT 2016
evgeny777 added inline comments.
================
Comment at: ELF/InputSection.h:259-261
@@ -258,1 +258,5 @@
+// A special kind of section used to store common symbols
+template <class ELFT> class CommonInputSection : public InputSection<ELFT> {
+ typedef typename ELFT::uint uintX_t;
+
----------------
ruiu wrote:
> You introduced this class, but you are using this only for the linker script. If linker scirpts are not used, common symbols directly belong to .bss, but if there are, they belong to some output sectino through this CommonInputSection.
>
> Why don't you use this section both in LinkerScript.cpp and in Writer.cpp? You could create a CommonInputSection, which virtually contains all common symbols in Writer.cpp and add that input sectino to .bss, no?
Makes sense.
Repository:
rL LLVM
https://reviews.llvm.org/D22811
More information about the llvm-commits
mailing list