diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 85 | ||||
-rw-r--r-- | elf/sotruss-lib.c | 58 |
2 files changed, 56 insertions, 87 deletions
diff --git a/elf/Makefile b/elf/Makefile index 25ffc5765b..59a3936a1b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -41,91 +41,6 @@ shared-only-routines += dl-caller rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines) -distribute := rtld-Rules \ - $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \ - dl-cache.h dl-hash.h soinit.c sofini.c ldd.bash.in \ - genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \ - dl-librecon.h interp.c sln.c dl-dst.h hp-timing.h \ - dl-lookupcfg.h sprof.c gen-trusted-dirs.awk \ - testobj1.c testobj2.c testobj3.c testobj4.c testobj5.c \ - testobj6.c testobj1_1.c failobj.c unloadmod.c \ - ldconfig.h ldconfig.c cache.c readlib.c readelflib.c \ - chroot_canon.c gccframe.h \ - dep1.c dep2.c dep3.c dep4.c dl-dtprocnum.h unsecvars.h \ - vismain.c vismod1.c vismod2.c vismod3.c \ - constload2.c constload3.c filtmod1.c filtmod2.c \ - nodlopenmod.c nodelete.c nodelmod1.c nodelmod2.c \ - nodelmod3.c nodelmod4.c nodlopen.c dl-osinfo.h \ - reldepmod1.c reldepmod2.c reldepmod3.c reldepmod4.c \ - reldepmod5.c reldepmod6.c \ - reldep4mod1.c reldep4mod2.c reldep4mod3.c reldep4mod4.c \ - nextmod1.c nextmod2.c pathoptobj.c tst-pathopt.sh \ - neededobj1.c neededobj2.c neededobj3.c neededobj4.c \ - neededobj5.c neededobj6.c firstobj.c \ - unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c \ - testobj.h vismod.h globalmod1.c \ - dblloadmod1.c dblloadmod2.c dblloadmod3.c \ - reldep6mod4.c reldep6mod3.c reldep6mod2.c reldep6mod1.c \ - reldep6mod0.c reldep7mod1.c reldep7mod2.c \ - unwind-dw2.c unwind-dw2-fde.c unwind.h unwind-pe.h \ - unwind-dw2-fde.h dwarf2.h dl-procinfo.c tls.h dl-tls.h \ - tst-tlsmod1.c tst-tlsmod2.c tst-tlsmod3.c tst-tlsmod4.c \ - tst-tlsmod5.c tst-tlsmod6.c tst-tlsmod7.c tst-tlsmod8.c \ - tst-tlsmod9.c tst-tlsmod10.c tst-tlsmod11.c \ - tst-tlsmod12.c tst-tls10.h tst-alignmod.c tst-alignmod2.c \ - circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \ - circlemod3.c circlemod3a.c nodlopenmod2.c \ - tst-tls19mod1.c tst-tls19mod2.c tst-tls19mod3.c \ - tls-macros.h \ - reldep8mod1.c reldep8mod2.c reldep8mod3.c \ - nodel2mod1.c nodel2mod2.c nodel2mod3.c \ - reldep9.c reldep9mod1.c reldep9mod2.c reldep9mod3.c \ - tst-array1.exp tst-array2.exp tst-array4.exp \ - tst-array2dep.c tst-piemod1.c \ - tst-execstack-mod.c tst-dlmodcount.c \ - check-textrel.c dl-sysdep.h test-dlopenrpathmod.c \ - tst-deep1mod1.c tst-deep1mod2.c tst-deep1mod3.c \ - unload3mod1.c unload3mod2.c unload3mod3.c unload3mod4.c \ - unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \ - unload6mod1.c unload6mod2.c unload6mod3.c \ - unload7mod1.c unload7mod2.c \ - unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \ - tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \ - tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \ - tst-auditmod4a.c tst-auditmod4b.c \ - tst-audit5.c tst-auditmod5a.c tst-auditmod5b.c \ - tst-audit6.c tst-auditmod6a.c tst-auditmod6b.c \ - tst-auditmod6c.c \ - tst-audit7.c tst-auditmod7a.c tst-auditmod7b.c \ - order2mod1.c order2mod2.c order2mod3.c order2mod4.c \ - tst-stackguard1.c tst-stackguard1-static.c \ - tst-array5.c tst-array5-static.c tst-array5dep.c \ - tst-array5.exp tst-leaks1.c check-execstack.c \ - ifuncmain1.c ifuncmain1pic.c ifuncmain1vis.c \ - ifuncmain1vispic.c ifuncmain1static.c \ - ifuncmain1staticpic.c ifuncmain1picstatic.c \ - ifuncdep1.c ifuncdep1pic.c ifuncmod1.c \ - ifuncmain1pie.c ifuncmain1vispie.c \ - ifuncmain1staticpie.c \ - ifuncmain2.c ifuncmain2static.c ifuncdep2.c \ - ifuncmain2pic.c ifuncmain2picstatic.c ifuncdep2pic.c \ - ifuncmain3.c ifuncmod3.c \ - ifuncmain4.c ifuncmain4static.c ifuncmain4picstatic.c \ - ifuncmain5.c ifuncmain5pic.c ifuncmain5picstatic.c \ - ifuncmain5pie.c ifuncmain5static.c \ - ifuncmain5staticpic.c \ - ifuncdep5.c ifuncdep5pic.c ifuncmod5.c \ - ifuncmain6pie.c ifuncmod6.c \ - ifuncmain7.c ifuncmain7pic.c ifuncmain7picstatic.c \ - ifuncmain7pie.c ifuncmain7static.c \ - tst-unique1.c tst-unique1mod1.c tst-unique1mod2.c \ - tst-unique2.c tst-unique2mod1.c tst-unique2mod2.c \ - tst-initordera1.c tst-initordera2.c tst-initorderb1.c \ - tst-initorderb2.c tst-initordera3.c tst-initordera4.c \ - tst-initorder.c \ - tst-initorder2.c \ - tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c - CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-dl-iterate-phdr.c = $(uses-callbacks) diff --git a/elf/sotruss-lib.c b/elf/sotruss-lib.c index 542672692f..c2ab7330d4 100644 --- a/elf/sotruss-lib.c +++ b/elf/sotruss-lib.c @@ -1,5 +1,5 @@ /* Trace calls through PLTs and show caller, callee, and parameters. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gmail.com>, 2011. @@ -288,6 +288,40 @@ la_x86_64_gnu_pltenter (Elf64_Sym *sym __attribute__ ((unused)), return sym->st_value; } +#elif defined __sparc__ && !defined __arch64__ +Elf32_Addr +la_sparc32_gnu_pltenter (Elf32_Sym *sym __attribute__ ((unused)), + unsigned int ndx __attribute__ ((unused)), + uintptr_t *refcook, uintptr_t *defcook, + La_sparc32_regs *regs, unsigned int *flags, + const char *symname, long int *framesizep) +{ + print_enter (refcook, defcook, symname, + regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2], + *flags); + + /* No need to copy anything, we will not need the parameters in any case. */ + *framesizep = 0; + + return sym->st_value; +} +#elif defined __sparc__ && defined __arch64__ +Elf64_Addr +la_sparc64_gnu_pltenter (Elf64_Sym *sym __attribute__ ((unused)), + unsigned int ndx __attribute__ ((unused)), + uintptr_t *refcook, uintptr_t *defcook, + La_sparc64_regs *regs, unsigned int *flags, + const char *symname, long int *framesizep) +{ + print_enter (refcook, defcook, symname, + regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2], + *flags); + + /* No need to copy anything, we will not need the parameters in any case. */ + *framesizep = 0; + + return sym->st_value; +} #elif !defined HAVE_ARCH_PLTENTER # warning "pltenter for architecture not supported" #endif @@ -302,7 +336,7 @@ print_exit (uintptr_t *refcook, uintptr_t *defcook, const char *symname, if (print_pid) snprintf (buf, sizeof (buf), "%5ld: ", (long int) getpid ()); - fprintf (out_file, "%s%15s -> %-15s:%s%s - 0x%lu\n", + fprintf (out_file, "%s%15s -> %-15s:%s%s - 0x%lx\n", buf, (char *) *refcook, (char *) *defcook, " ", symname, reg); } @@ -327,6 +361,26 @@ la_x86_64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, return 0; } +#elif defined __sparc__ && !defined __arch64__ +unsigned int +la_sparc32_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, const struct La_sparc32_regs *inregs, + struct La_sparc32_retval *outregs, const char *symname) +{ + print_exit (refcook, defcook, symname, outregs->lrv_reg[0]); + + return 0; +} +#elif defined __sparc__ && defined __arch64__ +unsigned int +la_sparc64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, const struct La_sparc64_regs *inregs, + struct La_sparc64_retval *outregs, const char *symname) +{ + print_exit (refcook, defcook, symname, outregs->lrv_reg[0]); + + return 0; +} #elif !defined HAVE_ARCH_PLTEXIT # warning "pltexit for architecture not supported" #endif |