Add MCObjectFileInfo::getPCSection() helper to get a section for PCs
requested via MD_pcsections.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/MC/MCObjectFileInfo.cpp | ||
---|---|---|
1189 | Do we actually plan to write to these sections? Does setting SHF_WRITE prevent sharing of pages across multiple processes? Of SHF_WRITE pages still mapped as shared/write-protected first and then subject to copy-on-write? |
llvm/lib/MC/MCObjectFileInfo.cpp | ||
---|---|---|
1189 | This was needed for relocations (because linker needs section writable if it contains relocations). Now that we have relative relocations, maybe we don't need it anymore, but I'd like to reserve the option to modify the data in-place (whether we do it, or someone else finds a use for it). Cc @MaskRay |
llvm/lib/MC/MCObjectFileInfo.cpp | ||
---|---|---|
1189 | If it's shared across processes and COW, then it should be fine. |
llvm/lib/MC/MCObjectFileInfo.cpp | ||
---|---|---|
1189 | Note: Relocate relocations usually refer to R_*_RELATIVE. PC-relative static relocations are very different and should not be conflated. |
Do we actually plan to write to these sections? Does setting SHF_WRITE prevent sharing of pages across multiple processes? Of SHF_WRITE pages still mapped as shared/write-protected first and then subject to copy-on-write?