diff options
| author | Ali Bahrami <Ali.Bahrami@Sun.COM> | 2009-09-18 09:00:12 -0600 |
|---|---|---|
| committer | Ali Bahrami <Ali.Bahrami@Sun.COM> | 2009-09-18 09:00:12 -0600 |
| commit | cdcc71c09dccd8c66f98c710f068f0722fe6de56 (patch) | |
| tree | bbdf9c159cf02355f3e1af18aeeb04ce56492787 /usr/src/cmd/sgs/include | |
| parent | d670ce0b8f4bf35907a3b851264a57e04d74d22d (diff) | |
| download | illumos-joyent-cdcc71c09dccd8c66f98c710f068f0722fe6de56.tar.gz | |
6850768 ld option to autogenerate wrappers/interposers similar to GNU ld --wrap
PSARC/2009/493 ld -z wrap option
Diffstat (limited to 'usr/src/cmd/sgs/include')
| -rw-r--r-- | usr/src/cmd/sgs/include/debug.h | 3 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/include/libld.h | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/usr/src/cmd/sgs/include/debug.h b/usr/src/cmd/sgs/include/debug.h index 7de58465e2..d21f21bbaa 100644 --- a/usr/src/cmd/sgs/include/debug.h +++ b/usr/src/cmd/sgs/include/debug.h @@ -424,6 +424,7 @@ extern void Dbg_help(void); #define Dbg_syms_spec_title Dbg64_syms_spec_title #define Dbg_syms_updated Dbg64_syms_updated #define Dbg_syms_up_title Dbg64_syms_up_title +#define Dbg_syms_wrap Dbg64_syms_wrap #define Dbg_util_call_array Dbg64_util_call_array #define Dbg_util_call_fini Dbg64_util_call_fini @@ -632,6 +633,7 @@ extern void Dbg_help(void); #define Dbg_syms_spec_title Dbg32_syms_spec_title #define Dbg_syms_updated Dbg32_syms_updated #define Dbg_syms_up_title Dbg32_syms_up_title +#define Dbg_syms_wrap Dbg32_syms_wrap #define Dbg_util_call_array Dbg32_util_call_array #define Dbg_util_call_fini Dbg32_util_call_fini @@ -896,6 +898,7 @@ extern void Dbg_syms_sec_title(Lm_list *); extern void Dbg_syms_spec_title(Lm_list *); extern void Dbg_syms_updated(Ofl_desc *, Sym_desc *, const char *); extern void Dbg_syms_up_title(Lm_list *); +extern void Dbg_syms_wrap(Lm_list *, Word, const char *, const char *); extern void Dbg_tls_modactivity(Lm_list *, void *, uint_t); extern void Dbg_tls_static_block(Lm_list *, void *, ulong_t, ulong_t); diff --git a/usr/src/cmd/sgs/include/libld.h b/usr/src/cmd/sgs/include/libld.h index 9e965feda2..b2188a91db 100644 --- a/usr/src/cmd/sgs/include/libld.h +++ b/usr/src/cmd/sgs/include/libld.h @@ -150,6 +150,20 @@ typedef struct sreloc_cache { } Rlxrel_cache; /* + * Nodes in an ofl_wrap AVL tree + * + * wsn_name is the name of the symbol to be wrapped. wsn_wrapname is used + * when we need to refer to the wrap symbol, and consists of the symbol + * name with a __wrap_ prefix. + */ +typedef struct wrap_sym_node { + avl_node_t wsn_avlnode; /* AVL book-keeping */ + const char *wsn_name; /* Symbol name: XXX */ + const char *wsn_wrapname; /* Wrap symbol name: __wrap_XXX */ +} WrapSymNode; + + +/* * Output file processing structure */ typedef Lword ofl_flag_t; @@ -304,6 +318,7 @@ struct ofl_desc { /* sloppy_comdat_reloc() */ APlist *ofl_maptext; /* mapfile added text sections */ APlist *ofl_mapdata; /* mapfile added data sections */ + avl_tree_t *ofl_wrap; /* -z wrap symbols */ }; #define FLG_OF_DYNAMIC 0x00000001 /* generate dynamic output module */ |
