forked from OSchip/llvm-project
				
			[ELF] - Don't use uintX_t in DynamicReloc<ELFT>. NFC.
That allows to detemplate getGotPltOffset/getGotPltVA methods of SymbolBody and also will help to detemplate DynamicReloc itself later. llvm-svn: 297946
This commit is contained in:
		
							parent
							
								
									566fdf4a2a
								
							
						
					
					
						commit
						a0b1e2c3d8
					
				| 
						 | 
					@ -1195,7 +1195,7 @@ template <class ELFT> void DynamicSection<ELFT>::writeTo(uint8_t *Buf) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <class ELFT>
 | 
					template <class ELFT>
 | 
				
			||||||
typename ELFT::uint DynamicReloc<ELFT>::getOffset() const {
 | 
					typename uint64_t DynamicReloc<ELFT>::getOffset() const {
 | 
				
			||||||
  return InputSec->OutSec->Addr + InputSec->getOffset(OffsetInSec);
 | 
					  return InputSec->OutSec->Addr + InputSec->getOffset(OffsetInSec);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -310,16 +310,14 @@ private:
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <class ELFT> class DynamicReloc {
 | 
					template <class ELFT> class DynamicReloc {
 | 
				
			||||||
  typedef typename ELFT::uint uintX_t;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  DynamicReloc(uint32_t Type, const InputSectionBase *InputSec,
 | 
					  DynamicReloc(uint32_t Type, const InputSectionBase *InputSec,
 | 
				
			||||||
               uintX_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
 | 
					               uint64_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
 | 
				
			||||||
               int64_t Addend)
 | 
					               int64_t Addend)
 | 
				
			||||||
      : Type(Type), Sym(Sym), InputSec(InputSec), OffsetInSec(OffsetInSec),
 | 
					      : Type(Type), Sym(Sym), InputSec(InputSec), OffsetInSec(OffsetInSec),
 | 
				
			||||||
        UseSymVA(UseSymVA), Addend(Addend) {}
 | 
					        UseSymVA(UseSymVA), Addend(Addend) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  uintX_t getOffset() const;
 | 
					  uint64_t getOffset() const;
 | 
				
			||||||
  int64_t getAddend() const;
 | 
					  int64_t getAddend() const;
 | 
				
			||||||
  uint32_t getSymIndex() const;
 | 
					  uint32_t getSymIndex() const;
 | 
				
			||||||
  const InputSectionBase *getInputSec() const { return InputSec; }
 | 
					  const InputSectionBase *getInputSec() const { return InputSec; }
 | 
				
			||||||
| 
						 | 
					@ -329,7 +327,7 @@ public:
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
  SymbolBody *Sym;
 | 
					  SymbolBody *Sym;
 | 
				
			||||||
  const InputSectionBase *InputSec = nullptr;
 | 
					  const InputSectionBase *InputSec = nullptr;
 | 
				
			||||||
  uintX_t OffsetInSec;
 | 
					  uint64_t OffsetInSec;
 | 
				
			||||||
  bool UseSymVA;
 | 
					  bool UseSymVA;
 | 
				
			||||||
  int64_t Addend;
 | 
					  int64_t Addend;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue