[PATCH] D54487: Implement llvm.commandline named metadata

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 12:42:10 PST 2018


scott.linder added a comment.

In https://reviews.llvm.org/D54487#1297461, @JohnReagan wrote:

> I know you are just trying to match gcc behavior, but do you know why they use SHT_PROGBITS instead of something like SHT_NOTE for the information?  On OpenVMS, we use .note entries to record compilation date/time, compiler version, command line, etc. information that is later used by our linker to print out detail link maps.  Or is the intention that the information get propagated all the way to the final executable or shared library?


I don't have a good answer as to why GCC decided to use SHT_PROGBITS, and you're correct that I simply followed their lead. I think SHT_NOTE seems more appropriate, although at AMD we do want to propagate the section to the final executable/shared object; are the two incompatible? It seems fine if tools like strip remove the section.


Repository:
  rL LLVM

https://reviews.llvm.org/D54487





More information about the llvm-commits mailing list