Replace size_t with uintX_t in a few places.
If linking a 32 bit binary, these values must fit in 32 bits. llvm-svn: 252739
This commit is contained in:
parent
305586257c
commit
32994991ce
|
@ -173,13 +173,13 @@ MergeInputSection<ELFT>::getOffset(uintX_t Offset) {
|
|||
[](const uintX_t &A, const std::pair<uintX_t, size_t> &B) {
|
||||
return A < B.first;
|
||||
});
|
||||
size_t End = I == Offsets.end() ? Data.size() : I->first;
|
||||
uintX_t End = I == Offsets.end() ? Data.size() : I->first;
|
||||
--I;
|
||||
uintX_t Start = I->first;
|
||||
|
||||
// Compute the Addend and if the Base is cached, return.
|
||||
uintX_t Addend = Offset - Start;
|
||||
size_t &Base = I->second;
|
||||
uintX_t &Base = I->second;
|
||||
if (Base != size_t(-1))
|
||||
return Base + Addend;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ template <class ELFT> class MergeInputSection : public InputSectionBase<ELFT> {
|
|||
typedef typename llvm::object::ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
|
||||
|
||||
public:
|
||||
std::vector<std::pair<uintX_t, size_t>> Offsets;
|
||||
std::vector<std::pair<uintX_t, uintX_t>> Offsets;
|
||||
MergeInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header);
|
||||
static bool classof(const InputSectionBase<ELFT> *S);
|
||||
// Translate an offset in the input section to an offset in the output
|
||||
|
|
Loading…
Reference in New Issue