/Linux-v5.4/arch/um/kernel/ |
D | dyn.lds.S | 30 .rela.init : { *(.rela.init) } 32 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } 34 .rela.fini : { *(.rela.fini) } 36 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } 38 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } 40 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } 42 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } 44 .rela.ctors : { *(.rela.ctors) } 46 .rela.dtors : { *(.rela.dtors) } 48 .rela.got : { *(.rela.got) } [all …]
|
D | uml.lds.S | 59 .rela.plt : { 60 *(.rela.plt) 62 *(.rela.iplt)
|
/Linux-v5.4/tools/objtool/ |
D | elf.c | 97 struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset, in find_rela_by_dest_range() 100 struct rela *rela; in find_rela_by_dest_range() local 103 if (!sec->rela) in find_rela_by_dest_range() 107 hash_for_each_possible(sec->rela->rela_hash, rela, hash, o) in find_rela_by_dest_range() 108 if (rela->offset == o) in find_rela_by_dest_range() 109 return rela; in find_rela_by_dest_range() 114 struct rela *find_rela_by_dest(struct section *sec, unsigned long offset) in find_rela_by_dest() 353 struct rela *rela; in read_relas() local 368 sec->base->rela = sec; in read_relas() 371 rela = malloc(sizeof(*rela)); in read_relas() [all …]
|
D | orc_gen.c | 89 struct rela *rela; in create_orc_entry() local 101 rela = malloc(sizeof(*rela)); in create_orc_entry() 102 if (!rela) { in create_orc_entry() 106 memset(rela, 0, sizeof(*rela)); in create_orc_entry() 108 rela->sym = insn_sec->sym; in create_orc_entry() 109 rela->addend = insn_off; in create_orc_entry() 110 rela->type = R_X86_64_PC32; in create_orc_entry() 111 rela->offset = idx * sizeof(int); in create_orc_entry() 113 list_add_tail(&rela->list, &ip_relasec->rela_list); in create_orc_entry() 114 hash_add(ip_relasec->rela_hash, &rela->hash, rela->offset); in create_orc_entry()
|
D | check.c | 301 struct rela *rela; in add_dead_ends() local 320 list_for_each_entry(rela, &sec->rela_list, list) { in add_dead_ends() 321 if (rela->sym->type != STT_SECTION) { in add_dead_ends() 325 insn = find_insn(file, rela->sym->sec, rela->addend); in add_dead_ends() 328 else if (rela->addend == rela->sym->sec->len) { in add_dead_ends() 331 if (insn->sec == rela->sym->sec) { in add_dead_ends() 339 rela->sym->sec->name, rela->addend); in add_dead_ends() 344 rela->sym->sec->name, rela->addend); in add_dead_ends() 362 list_for_each_entry(rela, &sec->rela_list, list) { in add_dead_ends() 363 if (rela->sym->type != STT_SECTION) { in add_dead_ends() [all …]
|
D | elf.h | 33 struct section *base, *rela; member 56 struct rela { struct 59 GElf_Rela rela; argument 83 struct rela *find_rela_by_dest(struct section *sec, unsigned long offset); argument 84 struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset,
|
D | orc_dump.c | 73 GElf_Rela rela; in orc_dump() local 152 if (!gelf_getrela(rela_orc_ip, i, &rela)) { in orc_dump() 157 if (!gelf_getsym(symtab, GELF_R_SYM(rela.r_info), &sym)) { in orc_dump() 179 printf("%s+%llx:", name, (unsigned long long)rela.r_addend); in orc_dump()
|
/Linux-v5.4/arch/mips/kernel/ |
D | module.c | 45 u32 base, Elf_Addr v, bool rela) in apply_r_mips_none() argument 51 u32 base, Elf_Addr v, bool rela) in apply_r_mips_32() argument 59 u32 base, Elf_Addr v, bool rela) in apply_r_mips_26() argument 80 u32 base, Elf_Addr v, bool rela) in apply_r_mips_hi16() argument 84 if (rela) { in apply_r_mips_hi16() 119 u32 base, Elf_Addr v, bool rela) in apply_r_mips_lo16() argument 125 if (rela) { in apply_r_mips_lo16() 222 u32 base, Elf_Addr v, bool rela) in apply_r_mips_pc16() argument 228 u32 base, Elf_Addr v, bool rela) in apply_r_mips_pc21() argument 234 u32 base, Elf_Addr v, bool rela) in apply_r_mips_pc26() argument [all …]
|
/Linux-v5.4/arch/h8300/kernel/ |
D | module.c | 16 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 20 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 24 + rela[i].r_offset); in apply_relocate_add() 28 + ELF32_R_SYM(rela[i].r_info); in apply_relocate_add() 29 uint32_t v = sym->st_value + rela[i].r_addend; in apply_relocate_add() 31 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add() 37 if (ELF32_R_SYM(rela[i].r_info)) in apply_relocate_add() 62 me->name, ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add() 69 me->name, rela[i].r_offset); in apply_relocate_add()
|
/Linux-v5.4/arch/nios2/kernel/ |
D | module.c | 49 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 54 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 59 + rela[i].r_offset); in apply_relocate_add() 64 + ELF32_R_SYM(rela[i].r_info)); in apply_relocate_add() 65 uint32_t v = sym->st_value + rela[i].r_addend; in apply_relocate_add() 68 ELF32_R_TYPE(rela[i].r_info), in apply_relocate_add() 69 rela[i].r_offset, strtab + sym->st_name); in apply_relocate_add() 71 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add() 125 mod->name, ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
|
/Linux-v5.4/arch/alpha/kernel/ |
D | module.c | 29 process_reloc_for_got(Elf64_Rela *rela, in process_reloc_for_got() argument 32 unsigned long r_sym = ELF64_R_SYM (rela->r_info); in process_reloc_for_got() 33 unsigned long r_type = ELF64_R_TYPE (rela->r_info); in process_reloc_for_got() 34 Elf64_Sxword r_addend = rela->r_addend; in process_reloc_for_got() 60 rela->r_info |= g->got_offset << 8; in process_reloc_for_got() 68 Elf64_Rela *rela; in module_frob_arch_sections() local 113 rela = (void *)hdr + s->sh_offset; in module_frob_arch_sections() 115 process_reloc_for_got(rela+i, chains, in module_frob_arch_sections() 137 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 138 unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela); in apply_relocate_add() [all …]
|
/Linux-v5.4/arch/xtensa/kernel/ |
D | module.c | 54 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 62 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 64 + rela[i].r_offset; in apply_relocate_add() 66 + ELF32_R_SYM(rela[i].r_info); in apply_relocate_add() 67 value = sym->st_value + rela[i].r_addend; in apply_relocate_add() 69 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add() 158 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add() 178 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add() 184 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
|
/Linux-v5.4/arch/microblaze/kernel/ |
D | module.c | 23 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 34 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 37 rela[i].r_offset; in apply_relocate_add() 39 ELF32_R_SYM(rela[i].r_info); in apply_relocate_add() 40 value = sym->st_value + rela[i].r_addend; in apply_relocate_add() 42 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add() 110 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
|
/Linux-v5.4/arch/powerpc/kernel/ |
D | module_32.c | 24 static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num) in count_relocs() argument 33 if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 && in count_relocs() 34 (r_info != ELF32_R_SYM(rela[i].r_info) || in count_relocs() 35 r_addend != rela[i].r_addend)) { in count_relocs() 37 r_info = ELF32_R_SYM(rela[i].r_info); in count_relocs() 38 r_addend = rela[i].r_addend; in count_relocs() 215 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 222 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 225 + rela[i].r_offset; in apply_relocate_add() 229 + ELF32_R_SYM(rela[i].r_info); in apply_relocate_add() [all …]
|
D | module_64.c | 185 static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num) in count_relocs() argument 195 if (ELF64_R_TYPE(rela[i].r_info) == R_PPC_REL24 && in count_relocs() 196 (r_info != ELF64_R_SYM(rela[i].r_info) || in count_relocs() 197 r_addend != rela[i].r_addend)) { in count_relocs() 199 r_info = ELF64_R_SYM(rela[i].r_info); in count_relocs() 200 r_addend = rela[i].r_addend; in count_relocs() 529 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 547 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 550 + rela[i].r_offset; in apply_relocate_add() 553 + ELF64_R_SYM(rela[i].r_info); in apply_relocate_add() [all …]
|
D | vmlinux.lds.S | 283 .rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET) 286 *(.rela*) 391 *(.glink .iplt .plt .rela* .comment)
|
/Linux-v5.4/arch/s390/kernel/ |
D | module.c | 60 static void check_rela(Elf_Rela *rela, struct module *me) in check_rela() argument 64 info = me->arch.syminfo + ELF_R_SYM (rela->r_info); in check_rela() 65 switch (ELF_R_TYPE (rela->r_info)) { in check_rela() 114 Elf_Rela *rela; in module_frob_arch_sections() local 157 rela = (void *) hdr + sechdrs[i].sh_offset; in module_frob_arch_sections() 159 check_rela(rela + j, me); in module_frob_arch_sections() 215 static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab, in apply_rela() argument 224 loc = base + rela->r_offset; in apply_rela() 227 r_sym = ELF_R_SYM(rela->r_info); in apply_rela() 228 r_type = ELF_R_TYPE(rela->r_info); in apply_rela() [all …]
|
/Linux-v5.4/arch/hexagon/kernel/ |
D | module.c | 76 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local 87 sym = sym_base + ELF32_R_SYM(rela[i].r_info); in apply_relocate_add() 90 location = loc_base + rela[i].r_offset; in apply_relocate_add() 93 value = sym->st_value + rela[i].r_addend; in apply_relocate_add() 96 i, value, location, ELF32_R_TYPE(rela[i].r_info), in apply_relocate_add() 100 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add() 144 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
|
/Linux-v5.4/arch/s390/boot/ |
D | startup.c | 94 Elf64_Rela *rela_start, *rela_end, *rela; in handle_relocs() local 102 for (rela = rela_start; rela < rela_end; rela++) { in handle_relocs() 103 loc = rela->r_offset + offset; in handle_relocs() 104 val = rela->r_addend; in handle_relocs() 105 r_sym = ELF64_R_SYM(rela->r_info); in handle_relocs() 116 r_type = ELF64_R_TYPE(rela->r_info); in handle_relocs()
|
/Linux-v5.4/arch/arm64/kernel/ |
D | module-plts.c | 72 void *loc, const Elf64_Rela *rela, in module_emit_plt_entry() argument 80 u64 val = sym->st_value + rela->r_addend; in module_emit_plt_entry() 149 static bool duplicate_rel(const Elf64_Rela *rela, int num) in duplicate_rel() argument 156 return num > 0 && cmp_rela(rela + num, rela + num - 1) == 0; in duplicate_rel() 159 static unsigned int count_plts(Elf64_Sym *syms, Elf64_Rela *rela, int num, in count_plts() argument 169 switch (ELF64_R_TYPE(rela[i].r_info)) { in count_plts() 186 s = syms + ELF64_R_SYM(rela[i].r_info); in count_plts() 203 if (rela[i].r_addend != 0 || !duplicate_rel(rela, i)) in count_plts() 226 min_align = 2ULL << ffz(rela[i].r_offset | 0x7); in count_plts()
|
D | vmlinux.lds.S | 196 .rela.dyn : ALIGN(8) { 197 *(.rela .rela*) 200 __rela_offset = ABSOLUTE(ADDR(.rela.dyn) - KIMAGE_VADDR); 201 __rela_size = SIZEOF(.rela.dyn);
|
/Linux-v5.4/arch/ia64/kernel/ |
D | module.c | 321 duplicate_reloc (const Elf64_Rela *rela, unsigned int num) in duplicate_reloc() argument 326 if (rela[i].r_info == rela[num].r_info && rela[i].r_addend == rela[num].r_addend) in duplicate_reloc() 334 count_gots (const Elf64_Rela *rela, unsigned int num) in count_gots() argument 341 switch (ELF64_R_TYPE(rela[i].r_info)) { in count_gots() 351 if (!duplicate_reloc(rela, i)) in count_gots() 361 count_plts (const Elf64_Rela *rela, unsigned int num) in count_plts() argument 368 switch (ELF64_R_TYPE(rela[i].r_info)) { in count_plts() 376 if (!duplicate_reloc(rela, i)) in count_plts() 387 count_fdescs (const Elf64_Rela *rela, unsigned int num) in count_fdescs() argument 393 switch (ELF64_R_TYPE(rela[i].r_info)) { in count_fdescs() [all …]
|
/Linux-v5.4/arch/parisc/kernel/ |
D | module.c | 207 static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) in count_gots() argument 212 static inline unsigned long count_fdescs(const Elf_Rela *rela, unsigned long n) in count_fdescs() argument 217 static inline unsigned long count_stubs(const Elf_Rela *rela, unsigned long n) in count_stubs() argument 221 for (; n > 0; n--, rela++) in count_stubs() 223 switch (ELF32_R_TYPE(rela->r_info)) { in count_stubs() 233 static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) in count_gots() argument 237 for (; n > 0; n--, rela++) in count_gots() 239 switch (ELF64_R_TYPE(rela->r_info)) { in count_gots() 250 static inline unsigned long count_fdescs(const Elf_Rela *rela, unsigned long n) in count_fdescs() argument 254 for (; n > 0; n--, rela++) in count_fdescs() [all …]
|
/Linux-v5.4/Documentation/livepatch/ |
D | module-elf-format.rst | 52 embedding special "dynrela" (dynamic rela) sections in the resulting patch 110 Every symbol referenced by a rela in a livepatch relocation section is a 127 .klp.rela.objname.section_name 133 The relocation section name is prefixed with the string ".klp.rela." 149 .klp.rela.ext4.text.ext4_attr_store 150 .klp.rela.vmlinux.text.cmdline_proc_show 160 …[29] .klp.rela.9p.text.caches.show RELA 0000000000000000 002d58 0000c0 18 AIo 6… 161 …[30] .klp.rela.btrfs.text.btrfs.feature.attr.show RELA 0000000000000000 002e18 000060 18 AIo 6… 163 …[34] .klp.rela.ext4.text.ext4.attr.store RELA 0000000000000000 002fd8 0000d8 18 AIo 6… 164 …[35] .klp.rela.ext4.text.ext4.attr.show RELA 0000000000000000 0030b0 000150 18 AIo 6… [all …]
|
/Linux-v5.4/arch/powerpc/boot/ |
D | zImage.lds.S | 39 .rela.dyn : 44 *(.rela*)
|