diff options
author | Dale Johannesen <dalej@apple.com> | 2008-03-26 23:31:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-03-26 23:31:39 +0000 |
commit | d9ffd4cb92c95806b05df2d9f9e2be5c27cfe7fd (patch) | |
tree | 09ae8c828fd034cb03caf8ef90aa261f717d8e8b /lib | |
parent | 4d9c9e9d31408d9c7756ac241588862ffbe309ea (diff) | |
download | external_llvm-d9ffd4cb92c95806b05df2d9f9e2be5c27cfe7fd.zip external_llvm-d9ffd4cb92c95806b05df2d9f9e2be5c27cfe7fd.tar.gz external_llvm-d9ffd4cb92c95806b05df2d9f9e2be5c27cfe7fd.tar.bz2 |
Fix a bug in Darwin EH: FDE->CIE pointer must
be relocatable. Describe why .set is needed better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index dd7ba9c..e72ff07 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -925,19 +925,20 @@ public: void EmitSectionOffset(const char* Label, const char* Section, unsigned LabelNumber, unsigned SectionNumber, - bool IsSmall = false, bool isEH = false) { + bool IsSmall = false, bool isEH = false, + bool useSet = true) { bool printAbsolute = false; - if (TAI->needsSet()) { + if (isEH) + printAbsolute = TAI->isAbsoluteEHSectionOffsets(); + else + printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); + + if (TAI->needsSet() && useSet) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; PrintLabelName(Label, LabelNumber); - if (isEH) - printAbsolute = TAI->isAbsoluteEHSectionOffsets(); - else - printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); - if (!printAbsolute) { O << "-"; PrintLabelName(Section, SectionNumber); @@ -953,11 +954,6 @@ public: PrintLabelName(Label, LabelNumber); - if (isEH) - printAbsolute = TAI->isAbsoluteEHSectionOffsets(); - else - printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); - if (!printAbsolute) { O << "-"; PrintLabelName(Section, SectionNumber); @@ -2919,7 +2915,7 @@ private: EmitSectionOffset("eh_frame_begin", "eh_frame_common", EHFrameInfo.Number, EHFrameInfo.PersonalityIndex, - true, true); + true, true, false); Asm->EOL("FDE CIE offset"); EmitReference("eh_func_begin", EHFrameInfo.Number, true); |