Lines Matching defs:rel

110   static unsigned RelocType32(const ELFRelocation &rel);
112 static unsigned RelocType64(const ELFRelocation &rel);
114 static unsigned RelocSymbol32(const ELFRelocation &rel);
116 static unsigned RelocSymbol64(const ELFRelocation &rel);
118 static elf_addr RelocOffset32(const ELFRelocation &rel);
120 static elf_addr RelocOffset64(const ELFRelocation &rel);
122 static elf_sxword RelocAddend32(const ELFRelocation &rel);
124 static elf_sxword RelocAddend64(const ELFRelocation &rel);
161 unsigned ELFRelocation::RelocType32(const ELFRelocation &rel) {
162 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
165 return ELFRela::RelocType32(*llvm::cast<ELFRela *>(rel.reloc));
168 unsigned ELFRelocation::RelocType64(const ELFRelocation &rel) {
169 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
172 return ELFRela::RelocType64(*llvm::cast<ELFRela *>(rel.reloc));
175 unsigned ELFRelocation::RelocSymbol32(const ELFRelocation &rel) {
176 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
179 return ELFRela::RelocSymbol32(*llvm::cast<ELFRela *>(rel.reloc));
182 unsigned ELFRelocation::RelocSymbol64(const ELFRelocation &rel) {
183 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
186 return ELFRela::RelocSymbol64(*llvm::cast<ELFRela *>(rel.reloc));
189 elf_addr ELFRelocation::RelocOffset32(const ELFRelocation &rel) {
190 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
193 return llvm::cast<ELFRela *>(rel.reloc)->r_offset;
196 elf_addr ELFRelocation::RelocOffset64(const ELFRelocation &rel) {
197 if (auto *elfrel = llvm::dyn_cast<ELFRel *>(rel.reloc))
200 return llvm::cast<ELFRela *>(rel.reloc)->r_offset;
203 elf_sxword ELFRelocation::RelocAddend32(const ELFRelocation &rel) {
204 if (llvm::isa<ELFRel *>(rel.reloc))
207 return llvm::cast<ELFRela *>(rel.reloc)->r_addend;
210 elf_sxword ELFRelocation::RelocAddend64(const ELFRelocation &rel) {
211 if (llvm::isa<ELFRel *>(rel.reloc))
214 return llvm::cast<ELFRela *>(rel.reloc)->r_addend;
2572 ELFRelocation rel(rel_type);
2581 typedef unsigned (*reloc_info_fn)(const ELFRelocation &rel);
2596 if (!rel.Parse(rel_data, &offset))
2599 if (reloc_type(rel) != slot_type)
2602 lldb::offset_t symbol_offset = reloc_symbol(rel) * sym_hdr->sh_entsize;
2701 static void ApplyELF64ABS64Relocation(Symtab *symtab, ELFRelocation &rel,
2704 Symbol *symbol = symtab->FindSymbolByID(ELFRelocation::RelocSymbol64(rel));
2713 ELFRelocation::RelocOffset64(rel));
2714 uint64_t val_offset = value + ELFRelocation::RelocAddend64(rel);
2719 static void ApplyELF64ABS32Relocation(Symtab *symtab, ELFRelocation &rel,
2722 Symbol *symbol = symtab->FindSymbolByID(ELFRelocation::RelocSymbol64(rel));
2725 value += ELFRelocation::RelocAddend32(rel);
2740 ELFRelocation::RelocOffset32(rel));
2745 static void ApplyELF32ABS32RelRelocation(Symtab *symtab, ELFRelocation &rel,
2749 Symbol *symbol = symtab->FindSymbolByID(ELFRelocation::RelocSymbol32(rel));
2763 ELFRelocation::RelocOffset32(rel);
2788 ELFRelocation rel(rel_hdr->sh_type);
2791 typedef unsigned (*reloc_info_fn)(const ELFRelocation &rel);
2804 if (!rel.Parse(rel_data, &offset)) {
2805 GetModule()->ReportError(".rel{0}[{1:d}] failed to parse relocation",
2814 switch (reloc_type(rel)) {
2816 ApplyELF32ABS32RelRelocation(symtab, rel, debug_data, rel_section);
2820 " .rel{0}[{1}], type {2}",
2822 reloc_type(rel));
2829 switch (reloc_type(rel)) {
2831 symbol = symtab->FindSymbolByID(reloc_symbol(rel));
2834 rel_section->GetFileOffset() + ELFRelocation::RelocOffset32(rel);
2843 if (rel.IsRela()) {
2844 value += ELFRelocation::RelocAddend32(rel);
2850 GetModule()->ReportError(".rel{0}[{1}] unknown symbol id: {2:d}",
2852 reloc_symbol(rel));
2858 " .rel{0}[{1}], type {2}",
2860 reloc_type(rel));
2874 switch (reloc_type(rel)) {
2876 ApplyELF64ABS64Relocation(symtab, rel, debug_data, rel_section);
2879 ApplyELF64ABS32Relocation(symtab, rel, debug_data, rel_section, true);
2886 switch (reloc_type(rel)) {
2888 ApplyELF64ABS64Relocation(symtab, rel, debug_data, rel_section);
2891 ApplyELF64ABS32Relocation(symtab, rel, debug_data, rel_section, true);
2898 switch (reloc_type(rel)) {
2900 ApplyELF64ABS64Relocation(symtab, rel, debug_data, rel_section);
2903 ApplyELF64ABS32Relocation(symtab, rel, debug_data, rel_section,
2907 ApplyELF64ABS32Relocation(symtab, rel, debug_data, rel_section, true);
2945 Section *rel = section_list->FindSectionByID(rel_id).get();
2946 if (!rel)
2961 if (GetData(rel->GetFileOffset(), rel->GetFileSize(), rel_data) &&
3140 std::string needle = std::string(".rel") + section_name;