[PATCH] Entry point function should never be dead-stripped.

Rui Ueyama ruiu at google.com
Mon Aug 26 19:11:09 PDT 2013


  Can you elaborate as to why you don't like to add a symbol to _deadStripRoots if deadstripping is not enabled? Your suggestion makes sense and I actually like the idea to add deadStrip attribute to the undefined atom, but it seems over engineering because my approach does the job in a simpler way.

   - We don't want to dead strip the entry symbol on any platform, so the approach that works on all platforms is preferred. My code works on all platforms, while adding code to ExecutableWriter<ELFT>::addDefaultAtoms() or equivalents needs modification for each platform.
   - _deadStripRoots in my approach contains a list of *possible* atoms that should not be stripped if deadstripping is enabled. This is I think not semantically confusing. Overhead when deadstripping is disabled is that one string is added to the vector, which is negligible from the perspective of performance.

http://llvm-reviews.chandlerc.com/D1524



More information about the llvm-commits mailing list