[PATCH] D32887: [ELF] Emit __ehdr_start when there is a segment containing program headers

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 11:52:22 PDT 2017


phosek added a comment.

In https://reviews.llvm.org/D32887#749970, @ruiu wrote:

> I'm reluctant to introduce a new concept of `SymbolReference` just for __ehdr_start symbol which is frankly speaking not that important. You needed these new concepts for defining __ehdr_start only when an ELF header is memory-allocated, right? Is there any problem if you always define that symbol and leave it zero if an ELF header is not in an allocated segment?


I can use just tuple to avoid defining a new concept, that should be sufficient. The reason I don't like always defining `__ehdr_start` is because it changes its semantics and hence might break the existing code that relies on the existing semantics. In our case, it'll break the kernel build so we'll need a special case for LLD.


Repository:
  rL LLVM

https://reviews.llvm.org/D32887





More information about the llvm-commits mailing list