[lld] [LLD] Extend special OpenBSD support, but scope under ELFOSABI (PR #97122)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 22:40:17 PDT 2024


================
@@ -2273,10 +2279,23 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(Partition &part) {
     addHdr(PT_GNU_EH_FRAME, part.ehFrameHdr->getParent()->getPhdrFlags())
         ->add(part.ehFrameHdr->getParent());
 
-  // 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);
+  // Handle OpenBSD-specific section types for OpenBSD "OS ABI".
----------------
MaskRay wrote:

This comment can be removed. the code self explains

https://github.com/llvm/llvm-project/pull/97122


More information about the llvm-commits mailing list