[PATCH] [ELF] Make -init/-fini options compatible with the gnu linker

Joerg Sonnenberger joerg at NetBSD.org
Tue Dec 9 06:06:19 PST 2014


================
Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:220
@@ -223,1 +219,3 @@
+  /// configured by the -init command line option.
+  StringRef initFunction() const { return _initFunction; }
 
----------------
While here, please move this to the corresponding set function.

================
Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:224
@@ -227,1 +223,3 @@
+  /// configured by the -fini command line option.
+  StringRef finiFunction() const { return _finiFunction; }
 
----------------
Same.

================
Comment at: test/elf/initfini-options.test:8
@@ +7,3 @@
+# c) If there are -init/-fini options, they override default function names
+#    and linker uses the corresponding symbol values for the DT_INIT/DT_FINI.
+
----------------
Personally, I'd prefer to have a separate file for each of the cases.

http://reviews.llvm.org/D6578






More information about the llvm-commits mailing list