[PATCH] D14833: [ELF] Define symbols "_end" and "end" if referenced.

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 18:04:48 PST 2015


ikudrin added a comment.

In http://reviews.llvm.org/D14833#293217, @davide wrote:

> I want to mention that gold keeps at least _end even if not referenced. I'm not sure what's the rationale behind that but something you may want to keep in mind.


Let's wait until the real case emerges. As far as I know, we don't expose symbols unless we know the case where they are required. For example, we don't add a well-known symbol "_GLOBAL_OFFSET_TABLE_", just use the corresponding value during calculation of relocations instead.


================
Comment at: ELF/Writer.cpp:899
@@ -881,1 +898,3 @@
 
+  // Update "_end" and, possibly, "end" symbols so that them
+  // point to the end of the data segment.
----------------
ruiu wrote:
> them -> they
Oh, thanks!


http://reviews.llvm.org/D14833





More information about the llvm-commits mailing list