mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
On ELF, put PIC jump tables in a non executable section.
Fixes PR22558. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228939 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -356,6 +356,13 @@ const MCSection *TargetLoweringObjectFileELF::getSectionForJumpTable(
|
||||
return getContext().getELFSection(Name, ELF::SHT_PROGBITS, Flags, 0, Group);
|
||||
}
|
||||
|
||||
bool TargetLoweringObjectFileELF::shouldPutJumpTableInFunctionSection(
|
||||
bool UsesLabelDifference, const Function &F) const {
|
||||
// We can always create relative relocations, so use another section
|
||||
// that can be marked non-executable.
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getSectionForConstant - Given a mergeable constant with the
|
||||
/// specified size and relocation information, return a section that it
|
||||
/// should be placed in.
|
||||
|
Reference in New Issue
Block a user