[PATCH] D87219: [ELF] Merge .openbsd.randomdata.* sections into a single .openbsd.randomdata section when linking

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 03:12:23 PDT 2020


grimar added a comment.

Well, if the default compiler on openbsd does it, I think the change is reasonable. @MaskRay?
This patch, as was mentioned, needs a test case.

Also, I believe LLD already creates the `PT_OPENBSD_RANDOMIZE` segment and adds the `.openbsd.randomdata`
section to it already in Writer.cpp:

  // PT_OPENBSD_RANDOMIZE is an OpenBSD-specific feature. That makes
  // the dynamic linker fill the segment with random data.
  if (OutputSection *cmd = findSection(".openbsd.randomdata", partNo))
    addHdr(PT_OPENBSD_RANDOMIZE, cmd->getPhdrFlags())->add(cmd);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87219/new/

https://reviews.llvm.org/D87219



More information about the llvm-commits mailing list