diff options
author | Toomas Soome <tsoome@me.com> | 2021-09-12 13:43:58 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-08-30 19:09:40 +0300 |
commit | 2570281cf351044b6936651ce26dbe1f801dcbd8 (patch) | |
tree | 54957dc5692258b6308df50c8d0f73a334421091 /usr/src/uts/sparc/krtld/kobj_reloc.c | |
parent | 2ec63ffb3ec249bd7cb4523118c8437e6c6be335 (diff) | |
download | illumos-gate-2570281cf351044b6936651ce26dbe1f801dcbd8.tar.gz |
14079 remove TNF
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/sparc/krtld/kobj_reloc.c')
-rw-r--r-- | usr/src/uts/sparc/krtld/kobj_reloc.c | 60 |
1 files changed, 6 insertions, 54 deletions
diff --git a/usr/src/uts/sparc/krtld/kobj_reloc.c b/usr/src/uts/sparc/krtld/kobj_reloc.c index 2fea631bd1..f8e5d88dea 100644 --- a/usr/src/uts/sparc/krtld/kobj_reloc.c +++ b/usr/src/uts/sparc/krtld/kobj_reloc.c @@ -38,49 +38,10 @@ #include <sys/elf.h> #include <sys/kobj.h> #include <sys/kobj_impl.h> -#include <sys/tnf.h> -#include <sys/tnf_probe.h> #include <sys/sdt.h> #include "krtld/reloc.h" - -/* - * Probe discovery support - */ -#define PROBE_MARKER_SYMBOL "__tnf_probe_version_1" -#define TAG_MARKER_SYMBOL "__tnf_tag_version_1" - -extern int tnf_splice_probes(int, tnf_probe_control_t *, tnf_tag_data_t *); - -/* - * The kernel run-time linker calls this to try to resolve a reference - * it can't otherwise resolve. We see if it's marking a probe control - * block or a probe tag block; if so, we do the resolution and return 0. - * If not, we return 1 to show that we can't resolve it, either. - */ -static int -tnf_reloc_resolve(char *symname, Addr *value_p, - Elf64_Sxword *addend_p, - long offset, - tnf_probe_control_t **probelist, - tnf_tag_data_t **taglist) -{ - if (strcmp(symname, PROBE_MARKER_SYMBOL) == 0) { - *addend_p = 0; - ((tnf_probe_control_t *)offset)->next = *probelist; - *probelist = (tnf_probe_control_t *)offset; - return (0); - } - if (strcmp(symname, TAG_MARKER_SYMBOL) == 0) { - *addend_p = 0; - *value_p = (Addr)*taglist; - *taglist = (tnf_tag_data_t *)offset; - return (0); - } - return (1); -} - #define SDT_RESTORE_MASK 0xc1f80000 #define SDT_RESTORE 0x81e80000 #define SDT_NOP 0x01000000 @@ -95,9 +56,8 @@ sdt_reloc_resolve(struct module *mp, char *symname, uint32_t *instr, long roff) sdt_probedesc_t *sdp; /* - * The "statically defined tracing" (SDT) provider for DTrace uses - * a mechanism similar to TNF, but somewhat simpler. (Surprise, - * surprise.) The SDT mechanism works by replacing calls to the + * The "statically defined tracing" (SDT) provider for DTrace. + * The SDT mechanism works by replacing calls to the * undefined routine __dtrace_probe_[name] with nop instructions. * The relocations are logged, and SDT itself will later patch the * running binary appropriately. @@ -156,8 +116,6 @@ do_relocate(struct module *mp, char *reltbl, int nreloc, int relocsize, Sym *symref; int symnum; int err = 0; - tnf_probe_control_t *probelist = NULL; - tnf_tag_data_t *taglist = NULL; reladdr = (uintptr_t)reltbl; rend = reladdr + nreloc * relocsize; @@ -255,9 +213,9 @@ do_relocate(struct module *mp, char *reltbl, int nreloc, int relocsize, } else { /* * It's global. Allow weak references. If - * the symbol is undefined, give TNF (the - * kernel probes facility) a chance to see - * if it's a probe site, and fix it up if so. + * the symbol is undefined, give dtrace + * a chance to see if it's a probe site, + * and fix it up if so. */ if (symref->st_shndx == SHN_UNDEF && sdt_reloc_resolve(mp, mp->strings + @@ -266,10 +224,7 @@ do_relocate(struct module *mp, char *reltbl, int nreloc, int relocsize, (uintptr_t)mp->text)) == 0) continue; - if (symref->st_shndx == SHN_UNDEF && - tnf_reloc_resolve(mp->strings + - symref->st_name, &symref->st_value, - &addend, off, &probelist, &taglist) != 0) { + if (symref->st_shndx == SHN_UNDEF) { if (ELF_ST_BIND(symref->st_info) != STB_WEAK) { _kobj_printf(ops, @@ -323,9 +278,6 @@ do_relocate(struct module *mp, char *reltbl, int nreloc, int relocsize, if (err) return (-1); - if (tnf_splice_probes(mp->flags & KOBJ_PRIM, probelist, taglist)) - mp->flags |= KOBJ_TNF_PROBE; - return (0); } |