From 1de2dd0e5edd2bc2c82d047cc0f3770488f09a11 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 27 Dec 2010 15:56:22 +0000 Subject: [PATCH] Add support for .cfi_lsda. llvm-svn: 122584 --- llvm/include/llvm/MC/MCDwarf.h | 1 + llvm/include/llvm/MC/MCStreamer.h | 2 +- llvm/lib/MC/MCAsmStreamer.cpp | 8 +- llvm/lib/MC/MCDwarf.cpp | 159 +++++++++++----- llvm/lib/MC/MCParser/AsmParser.cpp | 2 +- llvm/lib/MC/MCStreamer.cpp | 5 +- llvm/test/MC/ELF/cfi.s | 284 ++++++++++++++++------------- 7 files changed, 283 insertions(+), 178 deletions(-) diff --git a/llvm/include/llvm/MC/MCDwarf.h b/llvm/include/llvm/MC/MCDwarf.h index 99349b73e43f..303376f16e1b 100644 --- a/llvm/include/llvm/MC/MCDwarf.h +++ b/llvm/include/llvm/MC/MCDwarf.h @@ -232,6 +232,7 @@ namespace llvm { const MCSymbol *Personality; const MCSymbol *Lsda; unsigned PersonalityEncoding; + unsigned LsdaEncoding; }; class MCDwarfFrameEmitter { diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index 248b6f9b4291..ef2238da14f7 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -396,7 +396,7 @@ namespace llvm { virtual bool EmitCFIOffset(int64_t Register, int64_t Offset); virtual bool EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding); - virtual bool EmitCFILsda(const MCSymbol *Sym); + virtual bool EmitCFILsda(const MCSymbol *Sym, unsigned Encoding); /// EmitInstruction - Emit the given @p Instruction into the current /// section. diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index ee1342937f58..f8c3a8acae79 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -190,7 +190,7 @@ public: virtual bool EmitCFIDefCfaRegister(int64_t Register); virtual bool EmitCFIOffset(int64_t Register, int64_t Offset); virtual bool EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding); - virtual bool EmitCFILsda(const MCSymbol *Sym); + virtual bool EmitCFILsda(const MCSymbol *Sym, unsigned Encoding); virtual void EmitInstruction(const MCInst &Inst); @@ -769,11 +769,11 @@ bool MCAsmStreamer::EmitCFIPersonality(const MCSymbol *Sym, return false; } -bool MCAsmStreamer::EmitCFILsda(const MCSymbol *Sym) { - if (this->MCStreamer::EmitCFILsda(Sym)) +bool MCAsmStreamer::EmitCFILsda(const MCSymbol *Sym, unsigned Encoding) { + if (this->MCStreamer::EmitCFILsda(Sym, Encoding)) return true; - OS << ".cfi_lsda 0, " << *Sym; + OS << ".cfi_lsda " << Encoding << ", " << *Sym; EmitEOL(); return false; diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 9d26bec824e6..cd5141083e36 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/FoldingSet.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCDwarf.h" #include "llvm/MC/MCAssembler.h" @@ -508,9 +509,53 @@ static void EmitFrameMoves(MCStreamer &streamer, } } +static void EmitSymbol(MCStreamer &streamer, const MCSymbol &symbol, + unsigned symbolEncoding) { + MCContext &context = streamer.getContext(); + const TargetAsmInfo &asmInfo = context.getTargetAsmInfo(); + unsigned format = symbolEncoding & 0x0f; + unsigned application = symbolEncoding & 0xf0; + unsigned size; + switch (format) { + default: + assert(0 && "Unknown Encoding"); + break; + case dwarf::DW_EH_PE_absptr: + case dwarf::DW_EH_PE_signed: + size = asmInfo.getPointerSize(); + break; + case dwarf::DW_EH_PE_udata2: + case dwarf::DW_EH_PE_sdata2: + size = 2; + break; + case dwarf::DW_EH_PE_udata4: + case dwarf::DW_EH_PE_sdata4: + size = 4; + break; + case dwarf::DW_EH_PE_udata8: + case dwarf::DW_EH_PE_sdata8: + size = 8; + break; + } + switch (application) { + default: + assert(0 && "Unknown Encoding"); + break; + case 0: + case dwarf::DW_EH_PE_indirect: + streamer.EmitSymbolValue(&symbol, size); + break; + case dwarf::DW_EH_PE_pcrel: + streamer.EmitPCRelSymbolValue(&symbol, size); + break; + } +} + static const MCSymbol &EmitCIE(MCStreamer &streamer, const MCSymbol *personality, - unsigned personalityEncoding) { + unsigned personalityEncoding, + const MCSymbol *lsda, + unsigned lsdaEncoding) { MCContext &context = streamer.getContext(); const TargetAsmInfo &asmInfo = context.getTargetAsmInfo(); const MCSection §ion = *asmInfo.getEHFrameSection(); @@ -535,6 +580,8 @@ static const MCSymbol &EmitCIE(MCStreamer &streamer, Augmentation += "z"; if (personality) Augmentation += "P"; + if (lsda) + Augmentation += "L"; Augmentation += "R"; streamer.EmitBytes(Augmentation.str(), 0); streamer.EmitIntValue(0, 1); @@ -562,42 +609,11 @@ static const MCSymbol &EmitCIE(MCStreamer &streamer, // Personality Encoding streamer.EmitIntValue(personalityEncoding, 1); // Personality - unsigned format = personalityEncoding & 0x0f; - unsigned application = personalityEncoding & 0xf0; - unsigned size; - switch (format) { - default: - assert(0 && "Unknown Encoding"); - break; - case dwarf::DW_EH_PE_absptr: - case dwarf::DW_EH_PE_signed: - size = asmInfo.getPointerSize(); - break; - case dwarf::DW_EH_PE_udata2: - case dwarf::DW_EH_PE_sdata2: - size = 2; - break; - case dwarf::DW_EH_PE_udata4: - case dwarf::DW_EH_PE_sdata4: - size = 4; - break; - case dwarf::DW_EH_PE_udata8: - case dwarf::DW_EH_PE_sdata8: - size = 8; - break; - } - switch (application) { - default: - assert(0 && "Unknown Encoding"); - break; - case 0: - case dwarf::DW_EH_PE_indirect: - streamer.EmitSymbolValue(personality, size); - break; - case dwarf::DW_EH_PE_pcrel: - streamer.EmitPCRelSymbolValue(personality, size); - break; - } + EmitSymbol(streamer, *personality, personalityEncoding); + } + if (lsda) { + // LSDA Encoding + streamer.EmitIntValue(lsdaEncoding, 1); } // Encoding of the FDE pointers streamer.EmitIntValue(dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4, 1); @@ -619,8 +635,9 @@ static const MCSymbol &EmitCIE(MCStreamer &streamer, static MCSymbol *EmitFDE(MCStreamer &streamer, const MCSymbol &cieStart, const MCDwarfFrameInfo &frame) { - MCSymbol *fdeStart = streamer.getContext().CreateTempSymbol(); - MCSymbol *fdeEnd = streamer.getContext().CreateTempSymbol(); + MCContext &context = streamer.getContext(); + MCSymbol *fdeStart = context.CreateTempSymbol(); + MCSymbol *fdeEnd = context.CreateTempSymbol(); // Length const MCExpr *Length = MakeStartMinusEndExpr(streamer, *fdeStart, *fdeEnd, 0); @@ -641,9 +658,18 @@ static MCSymbol *EmitFDE(MCStreamer &streamer, streamer.EmitValue(Range, 4); // Augmentation Data Length - streamer.EmitULEB128IntValue(0); + MCSymbol *augmentationStart = streamer.getContext().CreateTempSymbol(); + MCSymbol *augmentationEnd = streamer.getContext().CreateTempSymbol(); + const MCExpr *augmentationLength = MakeStartMinusEndExpr(streamer, + *augmentationStart, + *augmentationEnd, 0); + streamer.EmitULEB128Value(augmentationLength); // Augmentation Data + streamer.EmitLabel(augmentationStart); + if (frame.Lsda) + EmitSymbol(streamer, *frame.Lsda, frame.LsdaEncoding); + streamer.EmitLabel(augmentationEnd); // Call Frame Instructions // Padding @@ -652,20 +678,63 @@ static MCSymbol *EmitFDE(MCStreamer &streamer, return fdeEnd; } +struct CIEKey { + static const CIEKey EmptyKey; + static const CIEKey TombstoneKey; + + CIEKey(const MCSymbol* Personality_, unsigned PersonalityEncoding_, + unsigned LsdaEncoding_) : Personality(Personality_), + PersonalityEncoding(PersonalityEncoding_), + LsdaEncoding(LsdaEncoding_) { + } + const MCSymbol* Personality; + unsigned PersonalityEncoding; + unsigned LsdaEncoding; +}; + +const CIEKey CIEKey::EmptyKey(0, 0, -1); +const CIEKey CIEKey::TombstoneKey(0, -1, 0); + +namespace llvm { + template <> + struct DenseMapInfo { + static CIEKey getEmptyKey() { + return CIEKey::EmptyKey; + } + static CIEKey getTombstoneKey() { + return CIEKey::TombstoneKey; + } + static unsigned getHashValue(const CIEKey &Key) { + FoldingSetNodeID ID; + ID.AddPointer(Key.Personality); + ID.AddInteger(Key.PersonalityEncoding); + ID.AddInteger(Key.LsdaEncoding); + return ID.ComputeHash(); + } + static bool isEqual(const CIEKey &LHS, + const CIEKey &RHS) { + return LHS.Personality == RHS.Personality && + LHS.PersonalityEncoding == RHS.PersonalityEncoding && + LHS.LsdaEncoding == RHS.LsdaEncoding; + } + }; +} + void MCDwarfFrameEmitter::Emit(MCStreamer &streamer) { const MCContext &context = streamer.getContext(); const TargetAsmInfo &asmInfo = context.getTargetAsmInfo(); MCSymbol *fdeEnd = NULL; - typedef std::pair personalityKey; - DenseMap personalities; + DenseMap CIEStarts; for (unsigned i = 0, n = streamer.getNumFrameInfos(); i < n; ++i) { const MCDwarfFrameInfo &frame = streamer.getFrameInfo(i); - personalityKey key(frame.Personality, frame.PersonalityEncoding); - const MCSymbol *&cieStart = personalities[key]; + CIEKey key(frame.Personality, frame.PersonalityEncoding, + frame.LsdaEncoding); + const MCSymbol *&cieStart = CIEStarts[key]; if (!cieStart) cieStart = &EmitCIE(streamer, frame.Personality, - frame.PersonalityEncoding); + frame.PersonalityEncoding, frame.Lsda, + frame.LsdaEncoding); fdeEnd = EmitFDE(streamer, *cieStart, frame); if (i != n - 1) streamer.EmitLabel(fdeEnd); diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 450a927a2ad2..27b2dced5549 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -2257,7 +2257,7 @@ bool GenericAsmParser::ParseDirectiveCFIPersonalityOrLsda(StringRef IDVal, return getStreamer().EmitCFIPersonality(Sym, Encoding); else { assert(IDVal == ".cfi_lsda"); - return getStreamer().EmitCFILsda(Sym); + return getStreamer().EmitCFILsda(Sym, Encoding); } } diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 399b4baded17..922a40ce3e71 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -157,7 +157,7 @@ bool MCStreamer::EmitCFIStartProc() { report_fatal_error("Starting a frame before finishing the previous one!"); return true; } - MCDwarfFrameInfo Frame = {0, 0, 0, 0}; + MCDwarfFrameInfo Frame = {0, 0, 0, 0, 0, 0}; Frame.Begin = getContext().CreateTempSymbol(); EmitLabel(Frame.Begin); FrameInfos.push_back(Frame); @@ -196,10 +196,11 @@ bool MCStreamer::EmitCFIPersonality(const MCSymbol *Sym, return false; } -bool MCStreamer::EmitCFILsda(const MCSymbol *Sym) { +bool MCStreamer::EmitCFILsda(const MCSymbol *Sym, unsigned Encoding) { EnsureValidFrame(); MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); CurFrame->Lsda = Sym; + CurFrame->LsdaEncoding = Encoding; return false; } diff --git a/llvm/test/MC/ELF/cfi.s b/llvm/test/MC/ELF/cfi.s index 644279e28d69..ce1d429ef87f 100644 --- a/llvm/test/MC/ELF/cfi.s +++ b/llvm/test/MC/ELF/cfi.s @@ -2,23 +2,27 @@ f1: .cfi_startproc + .cfi_lsda 0x3, bar nop .cfi_endproc f2: .cfi_startproc .cfi_personality 0x00, foo + .cfi_lsda 0x3, bar nop .cfi_endproc f3: .cfi_startproc + .cfi_lsda 0x3, bar nop .cfi_endproc f4: .cfi_startproc .cfi_personality 0x00, foo + .cfi_lsda 0x2, bar nop .cfi_endproc @@ -165,12 +169,12 @@ f27: // CHECK-NEXT: ('sh_flags', 0x00000002) // CHECK-NEXT: ('sh_addr', 0x00000000) // CHECK-NEXT: ('sh_offset', 0x00000060) -// CHECK-NEXT: ('sh_size', 0x00000508) +// CHECK-NEXT: ('sh_size', 0x00000538) // CHECK-NEXT: ('sh_link', 0x00000000) // CHECK-NEXT: ('sh_info', 0x00000000) // CHECK-NEXT: ('sh_addralign', 0x00000008) // CHECK-NEXT: ('sh_entsize', 0x00000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 10000000 1c000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a000000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 10000000 64000000 00000000 01000000 00000000 10000000 4c000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04020000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06030000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a040000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 040a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 060b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a0c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a080000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a100000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04120000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06130000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a140000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 041a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 061b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a1c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a180000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a800000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04820000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06830000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a840000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 048a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 068b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a8c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a880000 00000000 00001b0c 07089001 14000000 24000000 00000000 01000000 00000000 00000000') +// CHECK-NEXT: ('_section_data', '14000000 00000000 017a4c52 00017810 02031b0c 07089001 14000000 1c000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000003 1b0c0708 90010000 14000000 28000000 00000000 01000000 04000000 00000000 14000000 70000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000002 1b0c0708 90010000 10000000 28000000 00000000 01000000 02000000 18000000 00000000 017a5052 00017810 04020000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06030000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a040000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 040a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 060b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a0c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a080000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a100000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04120000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06130000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a140000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 041a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 061b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a1c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a180000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a800000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04820000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06830000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a840000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 048a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 068b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a8c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a880000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000') // CHECK-NEXT: ), // CHECK: # Section 0x00000008 @@ -178,8 +182,8 @@ f27: // CHECK-NEXT: ('sh_type', 0x00000004) // CHECK-NEXT: ('sh_flags', 0x00000000) // CHECK-NEXT: ('sh_addr', 0x00000000) -// CHECK-NEXT: ('sh_offset', 0x00000930) -// CHECK-NEXT: ('sh_size', 0x000004c8) +// CHECK-NEXT: ('sh_offset', 0x00000980) +// CHECK-NEXT: ('sh_size', 0x00000540) // CHECK-NEXT: ('sh_link', 0x00000006) // CHECK-NEXT: ('sh_info', 0x00000004) // CHECK-NEXT: ('sh_addralign', 0x00000008) @@ -192,301 +196,331 @@ f27: // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), // CHECK-NEXT: # Relocation 0x00000001 -// CHECK-NEXT: (('r_offset', 0x0000003e) +// CHECK-NEXT: (('r_offset', 0x00000029) // CHECK-NEXT: ('r_sym', 0x00000020) -// CHECK-NEXT: ('r_type', 0x00000001) +// CHECK-NEXT: ('r_type', 0x0000000a) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), // CHECK-NEXT: # Relocation 0x00000002 -// CHECK-NEXT: (('r_offset', 0x00000054) +// CHECK-NEXT: (('r_offset', 0x00000043) +// CHECK-NEXT: ('r_sym', 0x00000021) +// CHECK-NEXT: ('r_type', 0x00000001) +// CHECK-NEXT: ('r_addend', 0x00000000) +// CHECK-NEXT: ), +// CHECK-NEXT: # Relocation 0x00000003 +// CHECK-NEXT: (('r_offset', 0x0000005c) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000001) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000003 -// CHECK-NEXT: (('r_offset', 0x00000068) +// CHECK-NEXT: # Relocation 0x00000004 +// CHECK-NEXT: (('r_offset', 0x00000065) +// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: ('r_type', 0x0000000a) +// CHECK-NEXT: ('r_addend', 0x00000000) +// CHECK-NEXT: ), +// CHECK-NEXT: # Relocation 0x00000005 +// CHECK-NEXT: (('r_offset', 0x00000074) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000002) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000004 -// CHECK-NEXT: (('r_offset', 0x0000007c) +// CHECK-NEXT: # Relocation 0x00000006 +// CHECK-NEXT: (('r_offset', 0x0000007d) +// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: ('r_type', 0x0000000a) +// CHECK-NEXT: ('r_addend', 0x00000000) +// CHECK-NEXT: ), +// CHECK-NEXT: # Relocation 0x00000007 +// CHECK-NEXT: (('r_offset', 0x00000097) +// CHECK-NEXT: ('r_sym', 0x00000021) +// CHECK-NEXT: ('r_type', 0x00000001) +// CHECK-NEXT: ('r_addend', 0x00000000) +// CHECK-NEXT: ), +// CHECK-NEXT: # Relocation 0x00000008 +// CHECK-NEXT: (('r_offset', 0x000000b0) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000003) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000005 -// CHECK-NEXT: (('r_offset', 0x0000009a) +// CHECK-NEXT: # Relocation 0x00000009 +// CHECK-NEXT: (('r_offset', 0x000000b9) // CHECK-NEXT: ('r_sym', 0x00000020) // CHECK-NEXT: ('r_type', 0x0000000c) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000006 -// CHECK-NEXT: (('r_offset', 0x000000ac) +// CHECK-NEXT: # Relocation 0x0000000a +// CHECK-NEXT: (('r_offset', 0x000000ce) +// CHECK-NEXT: ('r_sym', 0x00000021) +// CHECK-NEXT: ('r_type', 0x0000000c) +// CHECK-NEXT: ('r_addend', 0x00000000) +// CHECK-NEXT: ), +// CHECK-NEXT: # Relocation 0x0000000b +// CHECK-NEXT: (('r_offset', 0x000000e0) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000004) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000007 -// CHECK-NEXT: (('r_offset', 0x000000ca) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000000c +// CHECK-NEXT: (('r_offset', 0x000000fe) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000a) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000008 -// CHECK-NEXT: (('r_offset', 0x000000dc) +// CHECK-NEXT: # Relocation 0x0000000d +// CHECK-NEXT: (('r_offset', 0x00000110) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000005) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000009 -// CHECK-NEXT: (('r_offset', 0x000000fa) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000000e +// CHECK-NEXT: (('r_offset', 0x0000012e) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000a -// CHECK-NEXT: (('r_offset', 0x00000110) +// CHECK-NEXT: # Relocation 0x0000000f +// CHECK-NEXT: (('r_offset', 0x00000144) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000006) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000b -// CHECK-NEXT: (('r_offset', 0x0000012e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000010 +// CHECK-NEXT: (('r_offset', 0x00000162) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000c) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000c -// CHECK-NEXT: (('r_offset', 0x00000140) +// CHECK-NEXT: # Relocation 0x00000011 +// CHECK-NEXT: (('r_offset', 0x00000174) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000007) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000d -// CHECK-NEXT: (('r_offset', 0x0000015e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000012 +// CHECK-NEXT: (('r_offset', 0x00000192) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000a) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000e -// CHECK-NEXT: (('r_offset', 0x00000170) +// CHECK-NEXT: # Relocation 0x00000013 +// CHECK-NEXT: (('r_offset', 0x000001a4) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000008) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000000f -// CHECK-NEXT: (('r_offset', 0x0000018e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000014 +// CHECK-NEXT: (('r_offset', 0x000001c2) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000010 -// CHECK-NEXT: (('r_offset', 0x000001a4) +// CHECK-NEXT: # Relocation 0x00000015 +// CHECK-NEXT: (('r_offset', 0x000001d8) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000009) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000011 -// CHECK-NEXT: (('r_offset', 0x000001c2) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000016 +// CHECK-NEXT: (('r_offset', 0x000001f6) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000012 -// CHECK-NEXT: (('r_offset', 0x000001d8) +// CHECK-NEXT: # Relocation 0x00000017 +// CHECK-NEXT: (('r_offset', 0x0000020c) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000a) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000013 -// CHECK-NEXT: (('r_offset', 0x000001f6) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000018 +// CHECK-NEXT: (('r_offset', 0x0000022a) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000018) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000014 -// CHECK-NEXT: (('r_offset', 0x0000020c) +// CHECK-NEXT: # Relocation 0x00000019 +// CHECK-NEXT: (('r_offset', 0x00000240) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000b) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000015 -// CHECK-NEXT: (('r_offset', 0x0000022a) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000001a +// CHECK-NEXT: (('r_offset', 0x0000025e) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000d) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000016 -// CHECK-NEXT: (('r_offset', 0x0000023c) +// CHECK-NEXT: # Relocation 0x0000001b +// CHECK-NEXT: (('r_offset', 0x00000270) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000c) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000017 -// CHECK-NEXT: (('r_offset', 0x0000025a) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000001c +// CHECK-NEXT: (('r_offset', 0x0000028e) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000018 -// CHECK-NEXT: (('r_offset', 0x0000026c) +// CHECK-NEXT: # Relocation 0x0000001d +// CHECK-NEXT: (('r_offset', 0x000002a0) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000d) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000019 -// CHECK-NEXT: (('r_offset', 0x0000028a) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000001e +// CHECK-NEXT: (('r_offset', 0x000002be) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000018) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001a -// CHECK-NEXT: (('r_offset', 0x000002a0) +// CHECK-NEXT: # Relocation 0x0000001f +// CHECK-NEXT: (('r_offset', 0x000002d4) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000e) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001b -// CHECK-NEXT: (('r_offset', 0x000002be) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000020 +// CHECK-NEXT: (('r_offset', 0x000002f2) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000d) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001c -// CHECK-NEXT: (('r_offset', 0x000002d0) +// CHECK-NEXT: # Relocation 0x00000021 +// CHECK-NEXT: (('r_offset', 0x00000304) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000000f) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001d -// CHECK-NEXT: (('r_offset', 0x000002ee) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000022 +// CHECK-NEXT: (('r_offset', 0x00000322) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001e -// CHECK-NEXT: (('r_offset', 0x00000300) +// CHECK-NEXT: # Relocation 0x00000023 +// CHECK-NEXT: (('r_offset', 0x00000334) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000010) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000001f -// CHECK-NEXT: (('r_offset', 0x0000031e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000024 +// CHECK-NEXT: (('r_offset', 0x00000352) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000018) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000020 -// CHECK-NEXT: (('r_offset', 0x00000334) +// CHECK-NEXT: # Relocation 0x00000025 +// CHECK-NEXT: (('r_offset', 0x00000368) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000011) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000021 -// CHECK-NEXT: (('r_offset', 0x00000352) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000026 +// CHECK-NEXT: (('r_offset', 0x00000386) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000018) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000022 -// CHECK-NEXT: (('r_offset', 0x00000368) +// CHECK-NEXT: # Relocation 0x00000027 +// CHECK-NEXT: (('r_offset', 0x0000039c) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000012) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000023 -// CHECK-NEXT: (('r_offset', 0x00000386) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000028 +// CHECK-NEXT: (('r_offset', 0x000003ba) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000024 -// CHECK-NEXT: (('r_offset', 0x0000039c) +// CHECK-NEXT: # Relocation 0x00000029 +// CHECK-NEXT: (('r_offset', 0x000003d0) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000013) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000025 -// CHECK-NEXT: (('r_offset', 0x000003ba) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000002a +// CHECK-NEXT: (('r_offset', 0x000003ee) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000c) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000026 -// CHECK-NEXT: (('r_offset', 0x000003cc) +// CHECK-NEXT: # Relocation 0x0000002b +// CHECK-NEXT: (('r_offset', 0x00000400) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000014) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000027 -// CHECK-NEXT: (('r_offset', 0x000003ea) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000002c +// CHECK-NEXT: (('r_offset', 0x0000041e) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000a) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000028 -// CHECK-NEXT: (('r_offset', 0x000003fc) +// CHECK-NEXT: # Relocation 0x0000002d +// CHECK-NEXT: (('r_offset', 0x00000430) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000015) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000029 -// CHECK-NEXT: (('r_offset', 0x0000041a) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x0000002e +// CHECK-NEXT: (('r_offset', 0x0000044e) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002a -// CHECK-NEXT: (('r_offset', 0x00000430) +// CHECK-NEXT: # Relocation 0x0000002f +// CHECK-NEXT: (('r_offset', 0x00000464) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000016) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002b -// CHECK-NEXT: (('r_offset', 0x0000044e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000030 +// CHECK-NEXT: (('r_offset', 0x00000482) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000c) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002c -// CHECK-NEXT: (('r_offset', 0x00000460) +// CHECK-NEXT: # Relocation 0x00000031 +// CHECK-NEXT: (('r_offset', 0x00000494) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000017) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002d -// CHECK-NEXT: (('r_offset', 0x0000047e) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000032 +// CHECK-NEXT: (('r_offset', 0x000004b2) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x0000000a) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002e -// CHECK-NEXT: (('r_offset', 0x00000490) +// CHECK-NEXT: # Relocation 0x00000033 +// CHECK-NEXT: (('r_offset', 0x000004c4) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000018) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x0000002f -// CHECK-NEXT: (('r_offset', 0x000004ae) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000034 +// CHECK-NEXT: (('r_offset', 0x000004e2) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000030 -// CHECK-NEXT: (('r_offset', 0x000004c4) +// CHECK-NEXT: # Relocation 0x00000035 +// CHECK-NEXT: (('r_offset', 0x000004f8) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x00000019) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000031 -// CHECK-NEXT: (('r_offset', 0x000004e2) -// CHECK-NEXT: ('r_sym', 0x00000020) +// CHECK-NEXT: # Relocation 0x00000036 +// CHECK-NEXT: (('r_offset', 0x00000516) +// CHECK-NEXT: ('r_sym', 0x00000021) // CHECK-NEXT: ('r_type', 0x00000001) // CHECK-NEXT: ('r_addend', 0x00000000) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x00000032 -// CHECK-NEXT: (('r_offset', 0x000004f8) +// CHECK-NEXT: # Relocation 0x00000037 +// CHECK-NEXT: (('r_offset', 0x0000052c) // CHECK-NEXT: ('r_sym', 0x0000001c) // CHECK-NEXT: ('r_type', 0x00000002) // CHECK-NEXT: ('r_addend', 0x0000001a)