[PATCH] D40849: CodeGen: support an extension to pass linker options on ELF

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 20 13:01:55 PST 2018


compnerd added inline comments.


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:4085-4086
+    if (Name != ".linker-options")
+      continue;
+
+    ArrayRef<uint8_t> Contents = unwrapOrError(Obj->getSectionContents(&Shdr));
----------------
ruiu wrote:
> It is one of the design principles of ELF that section names are not significant. Section should be identified by type and not by name. Can you define a new section type and use it?
As long as we are sure that this won't cause any issues with the BFD and gold linkers, I would be fine with that.  Unfortunately, compatibility needs to be considered here.


Repository:
  rL LLVM

https://reviews.llvm.org/D40849





More information about the llvm-commits mailing list