Home
last modified time | relevance | path

Searched full:rela (Results 1 – 25 of 53) sorted by relevance

123

/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/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/
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 …]
/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/powerpc/kernel/
H A Dreloc_32.S15 DT_RELASZ = 8 /* Size of the Rela relocs */
16 DT_RELAENT = 9 /* Size of one Rela reloc entry */
40 add r9, r9, r12 /* runtime address of .rela.dyn section */
47 * Scan the dynamic section for RELA, RELASZ entries
57 lwz r7, 4(r11) /* r7 = rela.link */
62 lwz r8, 4(r11) /* r8 = Total Rela relocs size */
67 lwz r6, 4(r11) /* r6 = Size of one Rela reloc */
83 * Work out the current offset from the link time address of .rela
85 * cur_offset[r7] = rela.run[r9] - rela.link [r7]
95 * Scan through the .rela table and process each entry
[all …]
H A Dreloc_64.S10 RELA = 7 define
27 add r9,r9,r12 /* r9 has runtime addr of .rela.dyn section */
34 * Scan the dynamic section for the RELA, RELASZ and RELAENT entries.
42 cmpdi r6,RELA
44 ld r7,8(r11) /* get RELA pointer in r7 */
56 cmpdi r7,0 /* check we have RELA, RELASZ, RELAENT */
66 * cur_offset [r7] = rela.run [r9] - rela.link [r7]
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 …]
/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.c42 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0) in module_frob_arch_sections()
58 * apply_relocate_add - perform rela relocations.
65 * Perform rela relocations.
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/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/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()
43 * RELA section, which is handled above. in relocate_kernel()
H A Drelacheck.c80 Elf64_Rela *rela; in main() local
86 /* only consider RELA sections operating on data */ in main()
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/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/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/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c317 * The linker of vmlinux will populate the position given by `rela` with
323 * by `rela`. This way the kernel can iterate over all kernel VAs used
327 * the beginning of the relocated section + the offset from `rela`.
329 static void emit_rela_abs64(Elf64_Rela *rela, const char *sh_orig_name) in emit_rela_abs64() argument
341 * is `rela->r_offset`. in emit_rela_abs64()
345 elf64toh(rela->r_offset)); in emit_rela_abs64()
357 * Iterate over all RELA relocations in a given section and emit
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()
[all …]
/linux/arch/powerpc/boot/
H A Dcrt0.S10 RELA = 7 define
69 * We need the RELA and RELACOUNT entries. */
75 cmpwi r8,RELA
77 lwz r9,4(r12) /* get RELA pointer in r9 */
101 add r9,r9,r11 /* Relocate RELA pointer */
165 cmpdi r12,RELA
167 ld r13,8(r11) /* get RELA pointer in r13 */
180 cmpdi r13,0 /* check we have both RELA, RELASZ, RELAENT*/
/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()
/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/s390/boot/
H A Dvmlinux.lds.S169 .rela.dyn : {
170 *(.rela.*) *(.rela_*)
172 ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!")
/linux/tools/objtool/arch/loongarch/
H A Dspecial.c32 rsec = find_section_by_name(file->elf, ".rela.discard.tablejump_annotate"); in get_rodata_table_size_by_table_annotate()
120 rsec = find_section_by_name(file->elf, ".rela.discard.tablejump_annotate"); in find_reloc_by_table_annotate()
187 * Each table entry has a rela associated with it. The rela in arch_find_switch_table()
/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()
/linux/arch/arm64/kernel/vdso/
H A Dvdso.lds.S59 .rela.dyn : ALIGN(8) { *(.rela .rela*) }
/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 …]

123