llvm-project
2bf35f32 - [PAC][ELF] Place AUTH constants in .data.rel.ro for position dependent code (#150418)

Commit
82 days ago
[PAC][ELF] Place AUTH constants in .data.rel.ro for position dependent code (#150418) For AArch64 target machine, effective relocation model on Windows and Darwin is always PIC, while for ELF targets Static is used when DynamicNoPIC is requested (see `getEffectiveRelocModel` in AArch64TargetMachine.cpp). This resulted in using .rodata section for AUTH constants, which is wrong since these are filled with AUTH dynamic relocs and require the section to be writeable during dynamic relocation resolving. This patch adds a check ensuring if the constant itself or one of the nested constants are AUTH ones. If so, use .data.rel.ro section.
Author
Parents
Loading