mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user