[PATCH] D45375: [ELF] - Introduce synthetic file for linker script symbols.

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 14:04:51 PDT 2018


espindola added a comment.

In https://reviews.llvm.org/D45375#1060202, @ruiu wrote:

> I mean unless you can show that this is super useful, I'd oppose to adding a new file type. If it is just mildly useful, we should do it in a different way (in case you really need it) or just leave it alone (otherwise).


Most lld symbols have files in them.  There is a special "kind" that is represented null pointer, which is somewhat annoying to handle.

That is the main reason I like this change: It makes more symbols have a non-null File. In fact, I think a simple followup could use SyntheticFile for symbols like GLOBAL_OFFSET_TABLE and we would never have to handle a null File again.


https://reviews.llvm.org/D45375





More information about the llvm-commits mailing list