Add r228939 back with a fix.

The problem in the original patch was not switching back to .text after printing
an eh table.

Original message:

On ELF, put PIC jump tables in a non executable section.

Fixes PR22558.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-02-17 23:34:51 +00:00
parent fb7982e95a
commit 3b75cfe179
6 changed files with 41 additions and 11 deletions

View File

@ -98,6 +98,9 @@ public:
getSectionForJumpTable(const Function &F, Mangler &Mang,
const TargetMachine &TM) const;
virtual bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
const Function &F) const;
/// Targets should implement this method to assign a section to globals with
/// an explicit section specfied. The implementation of this method can
/// assume that GV->hasSection() is true.