mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-28 04:03:35 +08:00
Reduce duplication.
This commit is contained in:
parent
b92f2d0423
commit
805ed74c10
@ -103,143 +103,64 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
Elf32_Addr
|
# define pltenter la_i86_gnu_pltenter
|
||||||
la_i86_gnu_pltenter (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_i86_gnu_pltexit
|
||||||
uintptr_t *defcook, La_i86_regs *regs,
|
# define La_regs La_i86_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_i86_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_eax
|
||||||
{
|
|
||||||
printf ("i86_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_i86_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_i86_regs *inregs,
|
|
||||||
La_i86_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("i86_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_eax);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
Elf64_Addr
|
# define pltenter la_x86_64_gnu_pltenter
|
||||||
la_x86_64_gnu_pltenter (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_x86_64_gnu_pltexit
|
||||||
uintptr_t *defcook, La_x86_64_regs *regs,
|
# define La_regs La_x86_64_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_x86_64_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_rax
|
||||||
{
|
|
||||||
printf ("x86_64_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_x86_64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_x86_64_regs *inregs,
|
|
||||||
La_x86_64_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("x86_64_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_rax);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#elif defined __powerpc__ && __WORDSIZE == 32
|
#elif defined __powerpc__ && __WORDSIZE == 32
|
||||||
Elf32_Addr
|
# define pltenter la_ppc32_gnu_pltenter
|
||||||
la_ppc32_gnu_pltenter (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_ppc32_gnu_pltexit
|
||||||
uintptr_t *defcook, La_ppc32_regs *regs,
|
# define La_regs La_ppc32_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_ppc32_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_r3
|
||||||
{
|
|
||||||
printf ("ppc32_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_ppc32_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_ppc32_regs *inregs,
|
|
||||||
La_ppc32_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("ppc32_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_r3);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#elif defined __powerpc__ && __WORDSIZE == 64
|
#elif defined __powerpc__ && __WORDSIZE == 64
|
||||||
Elf64_Addr
|
# define pltenter la_ppc64_gnu_pltenter
|
||||||
la_ppc64_gnu_pltenter (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_ppc64_gnu_pltexit
|
||||||
uintptr_t *defcook, La_ppc64_regs *regs,
|
# define La_regs La_ppc64_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_ppc64_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_r3
|
||||||
{
|
|
||||||
printf ("ppc64_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_ppc64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_ppc64_regs *inregs,
|
|
||||||
La_ppc64_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("ppc64_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_r3);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#elif defined __sh__
|
#elif defined __sh__
|
||||||
uintptr_t
|
# define pltenter la_sh_gnu_pltenter
|
||||||
la_sh_gnu_pltenter (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_sh_gnu_pltexit
|
||||||
uintptr_t *defcook, La_sh_regs *regs,
|
# define La_regs La_sh_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_sh_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_r0
|
||||||
{
|
|
||||||
printf ("sh_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_sh_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_sh_regs *inregs,
|
|
||||||
La_sh_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("sh_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_r0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#elif defined __mc68000__
|
#elif defined __mc68000__
|
||||||
Elf32_Addr
|
# define pltenter la_m68k_gnu_pltenter
|
||||||
la_m68k_gnu_pltenter (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
# define pltexit la_m68k_gnu_pltexit
|
||||||
uintptr_t *defcook, La_m68k_regs *regs,
|
# define La_regs La_m68k_regs
|
||||||
unsigned int *flags, const char *symname,
|
# define La_retval La_m68k_retval
|
||||||
long int *framesizep)
|
# define int_retval lrv_d0
|
||||||
{
|
|
||||||
printf ("m68k_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, *flags);
|
|
||||||
|
|
||||||
return sym->st_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
la_m68k_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
|
||||||
uintptr_t *defcook, const La_m68k_regs *inregs,
|
|
||||||
La_m68k_retval *outregs, const char *symname)
|
|
||||||
{
|
|
||||||
printf ("m68k_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
|
||||||
symname, (long int) sym->st_value, ndx, outregs->lrv_d0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
# error "architecture specific code needed"
|
# error "architecture specific code needed"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
ElfW(Addr)
|
||||||
|
pltenter (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
|
||||||
|
uintptr_t *defcook, La_regs *regs, unsigned int *flags,
|
||||||
|
const char *symname, long int *framesizep)
|
||||||
|
{
|
||||||
|
printf ("pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
||||||
|
symname, (long int) sym->st_value, ndx, *flags);
|
||||||
|
|
||||||
|
return sym->st_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
|
||||||
|
uintptr_t *defcook, const La_regs *inregs, La_retval *outregs,
|
||||||
|
const char *symname)
|
||||||
|
{
|
||||||
|
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
||||||
|
symname, (long int) sym->st_value, ndx, outregs->int_retval);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user