| /linux/Documentation/livepatch/ | 
| H A D | module-elf-format.rst | 21 loader to perform the all the arch-specific relocation work. Specifically,30 table, symbol table, and relocation section indices, ELF information is
 32 relocation sections and symbols, which are described in this document. The
 33 ELF constants used to mark livepatch symbols and relocation sections were
 51 relocation sections in place of dynrela sections, and the symbols that the
 53 arch-specific livepatch relocation code is replaced by a call to
 80 3. Livepatch relocation sections
 83 A livepatch module manages its own ELF relocation sections to apply
 87 relocation section(s) to the driver once it loads.
 90 multiple livepatch relocation sections associated with it (e.g. patches to
 [all …]
 
 | 
| /linux/arch/sh/kernel/ | 
| H A D | module.c | 33 	Elf32_Addr relocation;  in apply_relocate_add()  local47 		relocation = sym->st_value + rel[i].r_addend;  in apply_relocate_add()
 54 			value += relocation;  in apply_relocate_add()
 58 			relocation = (relocation - (Elf32_Addr) location);  in apply_relocate_add()
 60 			value += relocation;  in apply_relocate_add()
 65 				((relocation & 0xffff) << 10);  in apply_relocate_add()
 69 				(((relocation >> 16) & 0xffff) << 10);  in apply_relocate_add()
 72 			relocation -= (Elf32_Addr) location;  in apply_relocate_add()
 74 				((relocation & 0xffff) << 10);  in apply_relocate_add()
 77 			relocation -= (Elf32_Addr) location;  in apply_relocate_add()
 [all …]
 
 | 
| /linux/Documentation/bpf/ | 
| H A D | llvm_reloc.rst | 7 This document describes LLVM BPF backend relocation types.9 Relocation Record
 12 LLVM BPF backend records each relocation with the following 16-byte
 18     Elf64_Xword   r_info;    // Relocation type and symbol index.
 55   Relocation section '.rel.text' at offset 0x190 contains 4 entries:
 62 Each relocation is represented by ``Offset`` (8 bytes) and ``Info`` (8 bytes).
 63 For example, the first relocation corresponds to the first instruction
 64 (Offset 0x0) and the corresponding ``Info`` indicates the relocation type
 81 Similarly, the second relocation is at ``.text`` offset ``0x18``, instruction 3,
 83 The second relocation resolves to global variable ``g2`` which has a symbol
 [all …]
 
 | 
| /linux/arch/mips/include/asm/ | 
| H A D | module.h | 20 	Elf64_Addr r_offset;			/* Address of relocation.  */23 	Elf64_Byte r_type3;			/* Third relocation.  */
 24 	Elf64_Byte r_type2;			/* Second relocation.  */
 25 	Elf64_Byte r_type;			/* First relocation.  */
 29 	Elf64_Addr r_offset;			/* Address of relocation.  */
 32 	Elf64_Byte r_type3;			/* Third relocation.  */
 33 	Elf64_Byte r_type2;			/* Second relocation.  */
 34 	Elf64_Byte r_type;			/* First relocation.  */
 
 | 
| /linux/arch/arc/kernel/ | 
| H A D | module.c | 23  * This gets called before relocation loop in generic loader54 	Elf32_Addr relocation, location, tgt_addr;  in apply_relocate_add()  local
 72 	/* Loop thru entries in relocation section */  in apply_relocate_add()
 83 		relocation = sym_entry->st_value + rel_entry[i].r_addend;  in apply_relocate_add()
 93 			 sym_entry->st_value, location, relocation, s);  in apply_relocate_add()
 98 		 * Both of these are handled by same relocation type  in apply_relocate_add()
 103 			arc_write_me((unsigned short *)location, relocation);  in apply_relocate_add()
 105 			*((Elf32_Addr *) location) = relocation;  in apply_relocate_add()
 107 			*((Elf32_Addr *) location) = relocation - location;  in apply_relocate_add()
 121 	pr_err("%s: unknown relocation: %u\n",  in apply_relocate_add()
 
 | 
| /linux/scripts/ | 
| H A D | check_extable.sh | 26 # __ex_table relocation to your new section is expected), simply add your44     # When the relocation points to the begining of a symbol or section, it
 53     # The target of the .altinstr_replacement is the relocation just before
 79 	# We've got a relocation to a non white listed _executable_
 82 	# and line number where that relocation was added.
 86 	# Something is definitively wrong here since we've got a relocation
 110 	# Let's find out where the target of the relocation in __ex_table
 114 	# When there's a global symbol at the place of the relocation,
 127 	# Will either print a warning if the relocation happens to be in a
 
 | 
| /linux/arch/arm/mach-hisi/ | 
| H A D | platmcpm.c | 66  * [2]: relocation address67  * [3]: relocation size
 269 	void __iomem *relocation;  in hip04_smp_init()  local
 292 	relocation = ioremap(hip04_boot_method[2], hip04_boot_method[3]);  in hip04_smp_init()
 293 	if (!relocation) {  in hip04_smp_init()
 294 		pr_err("failed to map relocation space\n");  in hip04_smp_init()
 327 	writel_relaxed(hip04_boot_method[0], relocation);  in hip04_smp_init()
 328 	writel_relaxed(0xa5a5a5a5, relocation + 4);	/* magic number */  in hip04_smp_init()
 329 	writel_relaxed(__pa_symbol(secondary_startup), relocation + 8);  in hip04_smp_init()
 330 	writel_relaxed(0, relocation + 12);  in hip04_smp_init()
 [all …]
 
 | 
| /linux/arch/mips/kernel/ | 
| H A D | module.c | 42 		pr_err("module %s: dangerous R_MIPS_26 relocation\n",  in apply_r_mips_26()48 		pr_err("module %s: relocation overflow\n",  in apply_r_mips_26()
 73 	 * actual relocation.  in apply_r_mips_hi16()
 126 			 * Do the HI16 relocation.  Note that we actually don't  in apply_r_mips_lo16()
 165 	pr_err("module %s: dangerous R_MIPS_LO16 relocation\n", me->name);  in apply_r_mips_lo16()
 178 		pr_err("module %s: dangerous R_MIPS_PC%u relocation\n",  in apply_r_mips_pc()
 192 		pr_err("module %s: relocation overflow\n", me->name);  in apply_r_mips_pc()
 252  * reloc_handler() - Apply a particular relocation to a module
 253  * @type: type of the relocation to apply
 258  * @rela: indication of is this a RELA (true) or REL (false) relocation
 [all …]
 
 | 
| /linux/arch/arm64/kvm/hyp/nvhe/ | 
| H A D | gen-hyprel.c | 6  * Generates relocation information used by the kernel to convert47  * AArch64 relocation type constants.
 314  * Print ASM statements to create a hyp relocation entry for a given
 315  * R_AARCH64_ABS64 relocation.
 319  * also generate a dynamic relocation entry so that the kernel can shift
 326  * relocation referencing a symbol that the hyp linker script put at
 338 	 * Create a PREL32 relocation which instructs the linker of `vmlinux`  in emit_rela_abs64()
 358  * hyp relocation data for all absolute addresses in hyp code/data.
 361  * Failure is reported for unexpected relocation types.
 384 		 * Emit a hyp relocation.  in emit_rela_section()
 [all …]
 
 | 
| /linux/arch/loongarch/kernel/ | 
| H A D | module.c | 56 	pr_err("%s: Unsupport relocation type %u, please add its support.\n", me->name, type);  in apply_r_larch_error()159 		pr_err("%s: Unsupport relocation type %u\n", mod->name, type);  in apply_r_larch_sop()
 242 		pr_err("%s: Unsupport relocation type %u\n", mod->name, type);  in apply_r_larch_sop_imm_field()
 247 	pr_err("module %s: opr1 = 0x%llx overflow! dangerous %s (%u) relocation\n",  in apply_r_larch_sop_imm_field()
 252 	pr_err("module %s: opr1 = 0x%llx unaligned! dangerous %s (%u) relocation\n",  in apply_r_larch_sop_imm_field()
 274 		pr_err("%s: Unsupport relocation type %u\n", mod->name, type);  in apply_r_larch_add_sub()
 295 		pr_err("module %s: jump offset = 0x%llx unaligned! dangerous R_LARCH_B26 (%u) relocation\n",  in apply_r_larch_b26()
 301 		pr_err("module %s: jump offset = 0x%llx overflow! dangerous R_LARCH_B26 (%u) relocation\n",  in apply_r_larch_b26()
 340 		pr_err("%s: Unsupport relocation type %u\n", mod->name, type);  in apply_r_larch_pcala()
 364 		pr_err("%s: Unsupport relocation type %u\n", mod->name, type);  in apply_r_larch_got_pc()
 [all …]
 
 | 
| /linux/arch/x86/boot/compressed/ | 
| H A D | misc.c | 6  * which includes KASLR relocation, decompression, ELF parsing, and7  * relocation processing. Additionally included are the screen and serial
 24  * run time, but no relocation processing is performed. This means that
 213 	 * The kernel contains a table of relocation addresses. Those  in handle_relocations()
 230 		debug_putstr("No relocation needed... ");  in handle_relocations()
 238 	 * before compression. Each relocation table entry is the kernel  in handle_relocations()
 246 	 * 64 bit relocation repeated  in handle_relocations()
 248 	 * 32 bit relocation repeated  in handle_relocations()
 258 			error("32-bit relocation outside of kernel!\n");  in handle_relocations()
 269 			error("64-bit relocation outside of kernel!\n");  in handle_relocations()
 [all …]
 
 | 
| /linux/arch/mips/boot/tools/ | 
| H A D | relocs_64.c | 17 		Elf64_Byte r_type3;	/* Third relocation.  */18 		Elf64_Byte r_type2;	/* Second relocation.  */
 19 		Elf64_Byte r_type;	/* First relocation.  */
 
 | 
| /linux/arch/xtensa/kernel/ | 
| H A D | module.c | 87 					pr_err("%s: relocation out of range, "  in apply_relocate_add()111 					pr_err("%s: relocation out of range, "  in apply_relocate_add()
 156 			pr_err("%s: unexpected FLIX relocation: %u\n",  in apply_relocate_add()
 176 			pr_err("%s: unexpected ALT relocation: %u\n",  in apply_relocate_add()
 182 			pr_err("%s: unexpected relocation: %u\n",  in apply_relocate_add()
 
 | 
| /linux/Documentation/devicetree/bindings/remoteproc/ | 
| H A D | qcom,pil-info.yaml | 7 title: Qualcomm peripheral image loader relocation info13   The Qualcomm peripheral image loader relocation memory region, in IMEM, is
 14   used for communicating remoteproc relocation information to post mortem
 
 | 
| /linux/arch/x86/tools/ | 
| H A D | relocs.c | 657 			 * relocation is harmless.  in print_absolute_relocs()777 			 * relocation.  in do_reloc64()
 782 			die("Invalid absolute %s relocation: %s\n", rel_type(r_type), symname);  in do_reloc64()
 787 		 * Relocation offsets for 64 bit kernels are output  in do_reloc64()
 793 			die("Relocation offset doesn't fit in 32 bits\n");  in do_reloc64()
 802 		die("Unsupported relocation type: %s (%d)\n", rel_type(r_type), r_type);  in do_reloc64()
 834 			 * relocation.  in do_reloc32()
 839 			die("Invalid absolute %s relocation: %s\n", rel_type(r_type), symname);  in do_reloc32()
 847 		die("Unsupported relocation type: %s (%d)\n", rel_type(r_type), r_type);  in do_reloc32()
 876 			 * relocation.  in do_reloc_real()
 [all …]
 
 | 
| /linux/arch/arm64/kernel/ | 
| H A D | module.c | 48 	pr_err("do_reloc: unknown relocation operation %d\n", reloc_op);  in do_reloc()91 			pr_err("Invalid 16-bit data relocation (%d)\n", op);  in reloc_data()
 107 			pr_err("Invalid 32-bit data relocation (%d)\n", op);  in reloc_data()
 115 		pr_err("Invalid length (%d) for data relocation\n", len);  in reloc_data()
 176 	/* Calculate the relocation value. */  in reloc_insn_imm()
 260 		/* Perform the static relocation. */  in apply_relocate_add()
 429 			pr_err("module %s: unsupported RELA relocation: %llu\n",  in apply_relocate_add()
 442 	pr_err("module %s: overflow in relocation type %d val %Lx\n",  in apply_relocate_add()
 
 | 
| H A D | reloc_test_core.c | 55 	pr_info("Relocation test:\n");  in reloc_test_init()64 			pr_err("Relocation failed, expected 0x%016llx, not 0x%016llx\n",  in reloc_test_init()
 77 MODULE_DESCRIPTION("Relocation testing module");
 
 | 
| /linux/arch/riscv/include/uapi/asm/ | 
| H A D | elf.h | 36  * RISC-V relocation types39 /* Relocation types used by the dynamic linker */
 54 /* Relocation types not used by the dynamic linker */
 
 | 
| /linux/arch/x86/kernel/ | 
| H A D | module.c | 74 			pr_err("%s: Unknown relocation: %u\n",  in apply_relocate()140 				pr_err("%s: Unsupported GOTPCREL relocation\n", me->name);  in __write_relocate_add()
 158 			pr_err("%s: Unknown rela relocation: %llu\n",  in __write_relocate_add()
 165 …pr_err("x86/modules: Invalid relocation target, existing value is nonzero for type %d, loc %p, val…  in __write_relocate_add()
 172 …pr_warn("x86/modules: Invalid relocation target, existing value does not match expected value for …  in __write_relocate_add()
 182 	pr_err("overflow in relocation type %d val %Lx\n",  in __write_relocate_add()
 
 | 
| /linux/tools/testing/selftests/bpf/progs/ | 
| H A D | test_global_data.c | 37 /* Relocation tests for __u64s. */46 /* Relocation tests for strings. */
 51 /* Relocation tests for structs. */
 
 | 
| /linux/tools/testing/selftests/bpf/prog_tests/ | 
| H A D | log_fixup.c | 34 			  "0: <invalid CO-RE relocation>\n"  in bad_core_relo()35 			  "failed to resolve CO-RE relocation <byte_sz> ",  in bad_core_relo()
 90 			  ": <invalid CO-RE relocation>\n"  in bad_core_relo_subprog()
 91 			  "failed to resolve CO-RE relocation <byte_off> ",  in bad_core_relo_subprog()
 
 | 
| /linux/arch/riscv/kernel/ | 
| H A D | machine_kexec.c | 61 	/* Copy the assembler code for relocation to the control page */  in machine_kexec_prepare()67 			pr_err("Relocation code doesn't fit within a control page\n");  in machine_kexec_prepare()
 174 	/* Make sure the relocation code is visible to the hart */  in machine_kexec()
 177 	/* Jump to the relocation code */  in machine_kexec()
 
 | 
| H A D | module.c | 296 	  "%s: The unexpected relocation type 'R_RISCV_ALIGN' from PC = %p\n",  in apply_r_riscv_align_rela()453 		pr_err("%s: value %ld out of range for 6-bit relocation.\n",  in apply_6_bit_accumulation()
 465 		pr_err("%s: value %ld out of range for 8-bit relocation.\n",  in apply_8_bit_accumulation()
 476 		pr_err("%s: value %ld out of range for 16-bit relocation.\n",  in apply_16_bit_accumulation()
 487 		pr_err("%s: value %ld out of range for 32-bit relocation.\n",  in apply_32_bit_accumulation()
 605 	 * Each bucket may have more than one relocation location. All  in process_accumulated_relocations()
 612 	 * for the last relocation to an address.  in process_accumulated_relocations()
 617 	 *	- Each relocation entry for a location address  in process_accumulated_relocations()
 727 	/* Add relocation to head of discovered rel_head */  in add_relocation_to_accumulate()
 817 			pr_err("%s: Unknown relocation type %u\n",  in apply_relocate_add()
 [all …]
 
 | 
| /linux/tools/lib/bpf/ | 
| H A D | bpf_core_read.h | 11  * info_kind) returns __u32 integer and produces BTF field relocation, which40 	BPF_ENUMVAL_VALUE = 1,		/* enum value value relocation */
 96 	 * It forces compiler to perform BYTE_OFFSET relocation on p and use  \
 98 	 * the same relocation 4 times for each individual memory load.       \
 297  * offset relocation for source address using __builtin_preserve_access_index()
 302  * a relocation, which records BTF type ID describing root struct/union and an
 304  * an address. See detailed description of this relocation format and
 307  * This relocation allows libbpf to adjust BPF instruction to use correct
 309  * (local) BTF, used to record relocation.
 319  * additionally emitting BPF CO-RE field relocation fo
 [all...]
 | 
| /linux/drivers/remoteproc/ | 
| H A D | qcom_pil_info.c | 12  * The PIL relocation information region is used to communicate memory regions52 		pr_err("failed to map PIL relocation info region\n");  in qcom_pil_info_init()
 128 MODULE_DESCRIPTION("Qualcomm PIL relocation info");
 
 |