[PATCH] D15191: [ELF] Support PHDRS command

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 20:33:49 PST 2016


ruiu added a comment.

I don't like the current code to create a program header because it's not easy to read, and this is yet another piece of code that also creates a program header. This also feels a bit too complicated. I think one reason why phdr creation is hard to read is because the functions doing that are members of Writer, and they mutate Writer's fields.

They also do too much stuff once. They are creating program header while assigning addresses to sections.

Abstractly, in order to support PHDRS command, we want to have a class or a function that create a list of program header fields, and associate OutputSections to zero or more program header field. Can you model that way?


http://reviews.llvm.org/D15191





More information about the llvm-commits mailing list