[PATCH] D33700: Define __executable_start

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 14:52:02 PDT 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: ELF/Writer.cpp:916-917
+  // least the android libc is that it points to the elf header too.
+  for (const char *Name : {"__ehdr_start", "__executable_start"})
+    addOptionalRegular<ELFT>(Name, Out::ElfHeader, 0, STV_HIDDEN);
 
----------------
Since this is just two iterations, I'd do


  addOptionalRegular<ELFT>("__ehdr_start", Out::ElfHeader, 0, STV_HIDDEN);
  addOptionalRegular<ELFT>("__executable_start", Out::ElfHeader, 0, STV_HIDDEN);


https://reviews.llvm.org/D33700





More information about the llvm-commits mailing list