reloc_handler(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to reloc_handler(9) from the Kernel API Manual β€” the whole vibe is β€œapply a particular relocation to a module” πŸ’…βœ¨

πŸŽ€ NAME πŸŽ€

reloc_handler β€” apply a particular relocation to a module 🫢

✨ SYNOPSIS ✨

int reloc_handler (u32 type , struct module *me , u32 *location , u32
       base , Elf_Addr v , bool rela );

🫢 ARGUMENTS 🫢

  • type β€” the type of relocation to apply, like, the flavor of reloc we’re doing πŸ’«
  • me β€” the module to apply the reloc to πŸ‘‘
  • location β€” the address at which the reloc is to be applied πŸ“
  • base β€” the existing value at location for REL-style; 0 for RELA-style 🧚
  • v β€” the value of the reloc, with addend for RELA-style πŸ“
  • rela β€” indication of is this a RELA (true) or REL (false) relocation πŸ™ˆ

πŸ’… DESCRIPTION πŸ’…

So every implemented relocation function applies a particular type of relocation to the module me. That’s the whole assignment, no cap.

Relocs that may be found in either REL or RELA variants can be handled by making use of the base & v parameters β€” those are set to values which abstract the difference away from the particular reloc implementations. Basically the REL/RELA drama gets hidden from each individual reloc implementation, and honestly? iconic. πŸ’–

🌸 RETURN 🌸

0 upon success, else -ERRNO 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./arch/mips/kernel/module.c πŸ‘€


kiss kiss, this page is from ./arch/mips/kernel, dated October 2026, and it’s literally reloc_handler(9) β€” slay πŸ’œπŸŽ€

πŸ“¦ where this page comes from