1 //===- DWARFRelocMap.h ------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_DWARF_DWARFRELOCMAP_H
10 #define LLVM_DEBUGINFO_DWARF_DWARFRELOCMAP_H
12 #include "llvm/ADT/DenseMap.h"
17 /// RelocAddrEntry contains relocated value and section index.
18 /// Section index is -1LL if relocation points to absolute symbol.
19 struct RelocAddrEntry
{
20 uint64_t SectionIndex
;
24 /// In place of applying the relocations to the data we've read from disk we use
25 /// a separate mapping table to the side and checking that at locations in the
26 /// dwarf where we expect relocated values. This adds a bit of complexity to the
27 /// dwarf parsing/extraction at the benefit of not allocating memory for the
28 /// entire size of the debug info sections.
29 using RelocAddrMap
= DenseMap
<uint64_t, RelocAddrEntry
>;
31 } // end namespace llvm
33 #endif // LLVM_DEBUGINFO_DWARF_DWARFRELOCMAP_H