Home
last modified time | relevance | path

Searched refs:rela (Results 1 – 25 of 31) sorted by relevance

12

/linux/arch/um/kernel/
H A Ddyn.lds.S36 .rela.init : { *(.rela.init) }
38 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
40 .rela.fini : { *(.rela.fini) }
42 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
44 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
46 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
48 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
50 .rela.ctors : { *(.rela.ctors) }
52 .rela.dtors : { *(.rela.dtors) }
54 .rela.got : { *(.rela.got) }
[all …]
H A Duml.lds.S64 .rela.plt : {
65 *(.rela.plt)
67 *(.rela.iplt)
/linux/arch/mips/kernel/
H A Dmodule.c60 bool rela) in apply_r_mips_hi16() argument
64 if (rela) { in apply_r_mips_hi16()
99 u32 base, Elf_Addr v, bool rela) in apply_r_mips_lo16() argument
105 if (rela) { in apply_r_mips_lo16()
219 static int apply_r_mips_64(u32 *location, Elf_Addr v, bool rela) in apply_r_mips_64() argument
221 if (WARN_ON(!rela)) in apply_r_mips_64()
229 static int apply_r_mips_higher(u32 *location, Elf_Addr v, bool rela) in apply_r_mips_higher() argument
231 if (WARN_ON(!rela)) in apply_r_mips_higher()
240 static int apply_r_mips_highest(u32 *location, Elf_Addr v, bool rela) in apply_r_mips_highest() argument
242 if (WARN_ON(!rela)) in apply_r_mips_highest()
[all …]
/linux/arch/nios2/kernel/
H A Dmodule.c28 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local
33 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
38 + rela[i].r_offset); in apply_relocate_add()
43 + ELF32_R_SYM(rela[i].r_info)); in apply_relocate_add()
44 uint32_t v = sym->st_value + rela[i].r_addend; in apply_relocate_add()
47 ELF32_R_TYPE(rela[i].r_info), in apply_relocate_add()
48 rela[i].r_offset, strtab + sym->st_name); in apply_relocate_add()
50 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add()
104 mod->name, ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
/linux/arch/arm64/kernel/
H A Dmodule-plts.c70 void *loc, const Elf64_Rela *rela, in module_emit_plt_entry() argument
78 u64 val = sym->st_value + rela->r_addend; in module_emit_plt_entry()
147 static bool duplicate_rel(const Elf64_Rela *rela, int num) in duplicate_rel() argument
154 return num > 0 && cmp_rela(rela + num, rela + num - 1) == 0; in duplicate_rel()
157 static unsigned int count_plts(Elf64_Sym *syms, Elf64_Rela *rela, int num, in count_plts() argument
167 switch (ELF64_R_TYPE(rela[i].r_info)) { in count_plts()
181 s = syms + ELF64_R_SYM(rela[i].r_info); in count_plts()
198 if (rela[i].r_addend != 0 || !duplicate_rel(rela, i)) in count_plts()
220 min_align = 2ULL << ffz(rela[i].r_offset | 0x7); in count_plts()
249 static bool branch_rela_needs_plt(Elf64_Sym *syms, Elf64_Rela *rela, in branch_rela_needs_plt() argument
[all …]
H A Dvmlinux.lds.S285 .rela.dyn : ALIGN(8) {
287 *(.rela .rela*)
/linux/arch/alpha/kernel/
H A Dmodule.c29 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/arch/xtensa/kernel/
H A Dmodule.c54 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/arch/microblaze/kernel/
H A Dmodule.c23 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() local
31 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
34 rela[i].r_offset; in apply_relocate_add()
36 ELF32_R_SYM(rela[i].r_info); in apply_relocate_add()
37 value = sym->st_value + rela[i].r_addend; in apply_relocate_add()
39 switch (ELF32_R_TYPE(rela[i].r_info)) { in apply_relocate_add()
84 ELF32_R_TYPE(rela[i].r_info)); in apply_relocate_add()
/linux/arch/arm64/kernel/pi/
H A Drelocate.c19 for (const Elf64_Rela *rela = rela_start; rela < rela_end; rela++) { in relocate_kernel() local
20 if (ELF64_R_TYPE(rela->r_info) != R_AARCH64_RELATIVE) in relocate_kernel()
22 *(u64 *)(rela->r_offset + offset) = rela->r_addend + offset; in relocate_kernel()
H A Drelacheck.c80 Elf64_Rela *rela; in main() local
105 rela = (void *)ehdr + swab_elfxword(shdr[i].sh_offset); in main()
106 numrela = swab_elfxword(shdr[i].sh_size) / sizeof(*rela); in main()
109 uint64_t info = swab_elfxword(rela[j].r_info); in main()
117 rela[j].r_info = swab_elfxword(info); in main()
/linux/scripts/
H A Delf-parse.h47 uint64_t (*rela_offset)(Elf_Rela *rela);
48 uint64_t (*rela_info)(Elf_Rela *rela);
49 uint64_t (*rela_addend)(Elf_Rela *rela);
50 void (*rela_write_addend)(Elf_Rela *rela, uint64_t val);
221 static inline uint64_t rela64_##fn_name(Elf_Rela *rela) \ in SYM_WORD()
223 return elf_parser.r8((uint64_t *)&rela->e64.r_##fn_name); \ in SYM_WORD()
226 static inline uint64_t rela32_##fn_name(Elf_Rela *rela) \
228 return elf_parser.r((uint32_t *)&rela->e32.r_##fn_name); \
231 static inline uint64_t __maybe_unused rela_##fn_name(Elf_Rela *rela) \
233 return elf_parser.rela_##fn_name(rela); \
[all …]
/linux/arch/hexagon/kernel/
H A Dmodule.c76 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/arch/powerpc/kernel/
H A Dmodule_64.c161 static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num, in count_relocs() argument
172 if (ELF64_R_TYPE(rela[i].r_info) == r_type && in count_relocs()
173 (r_info != ELF64_R_SYM(rela[i].r_info) || in count_relocs()
174 r_addend != rela[i].r_addend)) { in count_relocs()
176 r_info = ELF64_R_SYM(rela[i].r_info); in count_relocs()
177 r_addend = rela[i].r_addend; in count_relocs()
268 const Elf64_Rela *rela, unsigned int num, in count_pcpu_relocs() argument
282 + ELF64_R_SYM(rela[i].r_info); in count_pcpu_relocs()
285 (r_info != ELF64_R_SYM(rela[i].r_info) || in count_pcpu_relocs()
286 r_addend != rela[i].r_addend)) { in count_pcpu_relocs()
[all …]
H A Dvmlinux.lds.S333 .rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET)
336 *(.rela*)
410 *(.rela*)
/linux/arch/loongarch/kernel/
H A Drelocate.c27 Elf64_Rela *rela, *rela_end; in relocate_relative() local
28 rela = (Elf64_Rela *)&__rela_dyn_begin; in relocate_relative()
31 for ( ; rela < rela_end; rela++) { in relocate_relative()
32 Elf64_Addr addr = rela->r_offset; in relocate_relative()
33 Elf64_Addr relocated_addr = rela->r_addend; in relocate_relative()
35 if (rela->r_info != R_LARCH_RELATIVE) in relocate_relative()
H A Dvmlinux.lds.S110 .rela.dyn : ALIGN(8) {
112 *(.rela.dyn) *(.rela*)
/linux/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c329 static void emit_rela_abs64(Elf64_Rela *rela, const char *sh_orig_name) in emit_rela_abs64() argument
345 elf64toh(rela->r_offset)); in emit_rela_abs64()
367 Elf64_Rela *rela; in emit_rela_section() local
375 for_each_rela(sh_rela, rela) { in emit_rela_section()
376 uint32_t type = (uint32_t)elf64toh(rela->r_info); in emit_rela_section()
379 assert_lt(elf64toh(rela->r_offset), elf64toh(sh_orig->sh_size), "0x%lx"); in emit_rela_section()
387 emit_rela_abs64(rela, sh_orig_name); in emit_rela_section()
/linux/arch/parisc/kernel/
H A Dmodule.c176 static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) in count_gots() argument
181 static inline unsigned long count_fdescs(const Elf_Rela *rela, unsigned long n) in count_fdescs() argument
186 static inline unsigned long count_stubs(const Elf_Rela *rela, unsigned long n) in count_stubs() argument
190 for (; n > 0; n--, rela++) in count_stubs()
192 switch (ELF32_R_TYPE(rela->r_info)) { in count_stubs()
202 static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) in count_gots() argument
206 for (; n > 0; n--, rela++) in count_gots()
208 switch (ELF64_R_TYPE(rela->r_info)) { in count_gots()
219 static inline unsigned long count_fdescs(const Elf_Rela *rela, unsigned long n) in count_fdescs() argument
223 for (; n > 0; n--, rela++) in count_fdescs()
[all …]
/linux/Documentation/livepatch/
H A Dmodule-elf-format.rst45 embedding special "dynrela" (dynamic rela) sections in the resulting patch
103 Every symbol referenced by a rela in a livepatch relocation section is a
120 .klp.rela.objname.section_name
126 The relocation section name is prefixed with the string ".klp.rela."
142 .klp.rela.ext4.text.ext4_attr_store
143 .klp.rela.vmlinux.text.cmdline_proc_show
153 …[29] .klp.rela.9p.text.caches.show RELA 0000000000000000 002d58 0000c0 18 AIo 6…
154 …[30] .klp.rela.btrfs.text.btrfs.feature.attr.show RELA 0000000000000000 002e18 000060 18 AIo 6…
156 …[34] .klp.rela.ext4.text.ext4.attr.store RELA 0000000000000000 002fd8 0000d8 18 AIo 6…
157 …[35] .klp.rela.ext4.text.ext4.attr.show RELA 0000000000000000 0030b0 000150 18 AIo 6…
[all …]
/linux/arch/arm64/kernel/vdso/
H A Dvdso.lds.S59 .rela.dyn : ALIGN(8) { *(.rela .rela*) }
/linux/arch/x86/boot/compressed/
H A Dvmlinux.lds.S124 .rela.dyn : {
125 *(.rela.*) *(.rela_*)
127 ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!")
/linux/arch/riscv/kernel/
H A Dmodule-sections.c73 static bool duplicate_rela(const Elf_Rela *rela, int idx) in duplicate_rela() argument
79 return idx > 0 && cmp_rela(rela + idx, rela + idx - 1) == 0; in duplicate_rela()
103 static bool rela_needs_plt_got_entry(const Elf_Rela *rela) in rela_needs_plt_got_entry() argument
105 switch (ELF_R_TYPE(rela->r_info)) { in rela_needs_plt_got_entry()
H A Dvmlinux.lds.S109 .rela.dyn : ALIGN(8) {
111 *(.rela .rela*)
/linux/arch/powerpc/boot/
H A DzImage.lds.S47 .rela.dyn :
52 *(.rela*)

12