diff options
author | Rui Ueyama <ruiu@google.com> | 2017-09-19 23:36:48 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-09-19 23:36:48 +0000 |
commit | b4affaa2a150fe1315891771e5260df9c5240913 (patch) | |
tree | 9bf5874707581cfab5d545e25e605eefe61fbea0 /lld/ELF/MarkLive.cpp | |
parent | 506afde132ae87c98418b86d17ebfe85d1cdf49a (diff) |
Compact EhSectionPiece from 32 bytes to 16 bytes.
EhSectionPiece used to have a pointer to a section, but that pointer was
mostly redundant because we almost always know what the section is without
using that pointer. This patch removes the pointer from the struct.
This patch also use uint32_t/int32_t instead of size_t to represent
offsets that are hardly be larger than 4 GiB. At the moment, I think it is
OK even if we cannot handle .eh_frame sections larger than 4 GiB.
Differential Revision: https://reviews.llvm.org/D38012
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r-- | lld/ELF/MarkLive.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index f3438c86821..da7a72480e2 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -126,7 +126,7 @@ scanEhFrameSection(EhInputSection &EH, ArrayRef<RelTy> Rels, unsigned FirstRelI = Piece.FirstRelocation; if (FirstRelI == (unsigned)-1) continue; - if (read32<E>(Piece.data().data() + 4) == 0) { + if (read32<E>(Piece.data(&EH).data() + 4) == 0) { // This is a CIE, we only need to worry about the first relocation. It is // known to point to the personality function. resolveReloc<ELFT>(EH, Rels[FirstRelI], Fn); |