diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/DWARFLinker.h --- a/llvm/include/llvm/DWARFLinker/DWARFLinker.h +++ b/llvm/include/llvm/DWARFLinker/DWARFLinker.h @@ -153,7 +153,7 @@ virtual void emitCIE(StringRef CIEBytes) = 0; /// Emit an FDE with data \p Bytes. - virtual void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address, + virtual void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes) = 0; /// Emit the .debug_loc contribution for \p Unit by copying the entries from diff --git a/llvm/include/llvm/DWARFLinker/DWARFStreamer.h b/llvm/include/llvm/DWARFLinker/DWARFStreamer.h --- a/llvm/include/llvm/DWARFLinker/DWARFStreamer.h +++ b/llvm/include/llvm/DWARFLinker/DWARFStreamer.h @@ -137,7 +137,7 @@ void emitCIE(StringRef CIEBytes) override; /// Emit an FDE with data \p Bytes. - void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address, + void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes) override; /// Emit DWARF debug names. diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp @@ -1895,7 +1895,7 @@ continue; } - uint32_t Loc = Data.getUnsigned(&InputOffset, AddrSize); + uint64_t Loc = Data.getUnsigned(&InputOffset, AddrSize); // Some compilers seem to emit frame info that doesn't start at // the function entry point, thus we can't just lookup the address diff --git a/llvm/lib/DWARFLinker/DWARFStreamer.cpp b/llvm/lib/DWARFLinker/DWARFStreamer.cpp --- a/llvm/lib/DWARFLinker/DWARFStreamer.cpp +++ b/llvm/lib/DWARFLinker/DWARFStreamer.cpp @@ -796,7 +796,7 @@ /// contains the FDE data without the length, CIE offset and address /// which will be replaced with the parameter values. void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize, - uint32_t Address, StringRef FDEBytes) { + uint64_t Address, StringRef FDEBytes) { MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection()); MS->emitIntValue(FDEBytes.size() + 4 + AddrSize, 4);