Changeset View
Changeset View
Standalone View
Standalone View
libexec/rtld-elf/powerpc64/reloc.c
Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | #endif | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* Update the value of a PLT jump slot. | * Update the value of a PLT jump slot. | ||||
*/ | */ | ||||
Elf_Addr | Elf_Addr | ||||
reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, | reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, | ||||
kib: You can add __unused attribute to the argument. It is innocent when not true. | |||||
const Obj_Entry *obj __unused, const Elf_Rel *rel __unused) | const Obj_Entry *obj __unused, const Elf_Rel *rel __unused) | ||||
{ | { | ||||
/* | /* | ||||
* At the PLT entry pointed at by `wherep', construct | * At the PLT entry pointed at by `wherep', construct | ||||
* a direct transfer to the now fully resolved function | * a direct transfer to the now fully resolved function | ||||
* address. | * address. | ||||
*/ | */ | ||||
Show All 32 Lines | if (((struct funcdesc *)(wherep))->addr < (Elf_Addr)defobj->relocbase) { | ||||
((struct funcdesc *)(wherep))->addr += | ((struct funcdesc *)(wherep))->addr += | ||||
(Elf_Addr)defobj->relocbase; | (Elf_Addr)defobj->relocbase; | ||||
((struct funcdesc *)(wherep))->toc += | ((struct funcdesc *)(wherep))->toc += | ||||
(Elf_Addr)defobj->relocbase; | (Elf_Addr)defobj->relocbase; | ||||
} | } | ||||
out: | out: | ||||
#else | #else | ||||
(void)defobj; | |||||
dbg(" reloc_jmpslot: where=%p, target=%p", (void *)wherep, | dbg(" reloc_jmpslot: where=%p, target=%p", (void *)wherep, | ||||
(void *)target); | (void *)target); | ||||
if (!ld_bind_not) | if (!ld_bind_not) | ||||
*wherep = target; | *wherep = target; | ||||
#endif | #endif | ||||
return (target); | return (target); | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |
You can add __unused attribute to the argument. It is innocent when not true.