diff options
Diffstat (limited to 'usr/src/cmd')
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/common/elfedit.c | 10 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/cap.c | 22 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/dyn.c | 28 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/ehdr.c | 14 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/phdr.c | 14 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/shdr.c | 18 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/str.c | 36 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/sym.c | 36 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/modules/common/syminfo.c | 12 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/machrel.amd.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/machrel.intel.c | 10 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/machrel.sparc.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/relocate.c | 28 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/sections.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/common/update.c | 6 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/librtld_db/common/rd_elf.c | 8 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/mcs/common/file.c | 34 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/mcs/common/utils.c | 4 |
18 files changed, 146 insertions, 146 deletions
diff --git a/usr/src/cmd/sgs/elfedit/common/elfedit.c b/usr/src/cmd/sgs/elfedit/common/elfedit.c index 2018d93bdd..8894ef312b 100644 --- a/usr/src/cmd/sgs/elfedit/common/elfedit.c +++ b/usr/src/cmd/sgs/elfedit/common/elfedit.c @@ -268,7 +268,7 @@ elfedit_msg(elfedit_msg_t type, const char *format, ...) { typedef enum { /* What to do after finished */ DISP_RET = 0, /* Return to caller */ - DISP_JMP = 1, /* if (interactive) longjmp else exit */ + DISP_JMP = 1, /* if (interactive) longjmp else exit */ DISP_EXIT = 2 /* exit under all circumstances */ } DISP; @@ -1420,7 +1420,7 @@ path_is_so(const char *path) static const char * elfedit_basename(const char *path, const char *tail, char *buf, size_t bufsiz) { - const char *s; + const char *s; if (tail == NULL) tail = path + strlen(path); @@ -1676,7 +1676,7 @@ validate_optarg(elfedit_cmd_optarg_t *optarg, int isopt, MODLIST_T *moddef, /* MSG_INTL(MSG_ERR_CMDOA_VALNAM) */ FAIL(MSG_ERR_CMDOA_VALNAM); } - if ((oa1->oa_help != NULL) || (oa1->oa_flags != 0) || + if ((oa1->oa_help != 0) || (oa1->oa_flags != 0) || (oa1->oa_idmask != 0) || (oa1->oa_excmask != 0)) { /* MSG_INTL(MSG_ERR_CMDOA_VALNOT0) */ FAIL(MSG_ERR_CMDOA_VALNOT0); @@ -1977,7 +1977,7 @@ elfedit_load_moddir(const char *dirpath, int must_exist, int abs_path) char path[PATH_MAX + 1]; DIR *dir; struct dirent *dp; - const char *tail; + const char *tail; dir = opendir(dirpath); if (dir == NULL) { @@ -3225,7 +3225,7 @@ cmd_match_fcn(WordCompletion *cpl, void *data, const char *line, int word_end) } skip_one = 0; ostyle_ndx = -1; - if ((strcmp(argv[i], MSG_ORIG(MSG_STR_MINUS_MINUS)) == NULL) || + if ((strcmp(argv[i], MSG_ORIG(MSG_STR_MINUS_MINUS)) == 0) || (*argv[i] != '-')) { opt_term_seen = 1; continue; diff --git a/usr/src/cmd/sgs/elfedit/modules/common/cap.c b/usr/src/cmd/sgs/elfedit/modules/common/cap.c index 6b94a6f8f4..7430d4d84f 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/cap.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/cap.c @@ -131,7 +131,7 @@ typedef struct { struct { /* String table */ elfedit_section_t *sec; } str; - cap_opt_t optmask; /* Mask of options used */ + cap_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ } ARGSTATE; @@ -1237,18 +1237,18 @@ elfedit_init(elfedit_module_version_t version) { /* For commands that only accept -capid, -and, -cmp, -o, and -or */ static elfedit_cmd_optarg_t opt_ostyle_capid_bitop[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_AND, CAP_OPT_F_OR }, { MSG_ORIG(MSG_STR_MINUS_CAPID), /* MSG_INTL(MSG_OPTDESC_CAPID) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE, CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX }, - { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { MSG_ORIG(MSG_STR_IDNAME), 0, 0 }, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_CMP, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_OR, CAP_OPT_F_AND }, { NULL } }; @@ -1259,7 +1259,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_CAPID) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE, CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX }, - { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_IDNAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_CAPNDX), /* MSG_INTL(MSG_OPTDESC_CAPNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0, @@ -1290,12 +1290,12 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_CAPID) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE, CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX }, - { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_IDNAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_CAPNDX), /* MSG_INTL(MSG_OPTDESC_CAPNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0, CAP_OPT_F_CAPNDX, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; @@ -1319,12 +1319,12 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_CAPID) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE, CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX }, - { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_IDNAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_CAPNDX), /* MSG_INTL(MSG_OPTDESC_CAPNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0, CAP_OPT_F_CAPNDX, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_S), /* MSG_INTL(MSG_OPTDESC_S) */ diff --git a/usr/src/cmd/sgs/elfedit/modules/common/dyn.c b/usr/src/cmd/sgs/elfedit/modules/common/dyn.c index ac8ec4b401..d4949e6ee7 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/dyn.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/dyn.c @@ -133,7 +133,7 @@ typedef struct { Word null_ndx; /* Index of first DT_NULL */ Word num_null_ndx; /* # of DT_NULL elements */ } dyn; - dyn_opt_t optmask; /* Mask of options used */ + dyn_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ const char *dyn_elt_str; /* Value string for */ @@ -1846,20 +1846,20 @@ elfedit_init(elfedit_module_version_t version) { /* For commands that only accept -o */ static elfedit_cmd_optarg_t opt_ostyle[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; /* For commands that only accept -and, -cmp, -o, -or */ static elfedit_cmd_optarg_t opt_ostyle_bitop[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_AND, DYN_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_CMP, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_OR, DYN_OPT_F_AND }, { NULL } }; @@ -1895,7 +1895,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_DYNNDX_ELT) */ ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_ELT), 0, DYN_OPT_F_DYNNDX_ELT, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; @@ -1923,7 +1923,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_DYNNDX_ELT) */ ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_ELT), 0, DYN_OPT_F_DYNNDX_ELT, DYN_OPT_F_ADD }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_S), /* MSG_INTL(MSG_OPTDESC_S) */ @@ -1990,25 +1990,25 @@ elfedit_init(elfedit_module_version_t version) static const char *name_posflag1[] = { MSG_ORIG(MSG_CMD_POSFLAG1), NULL }; static elfedit_cmd_optarg_t opt_posflag1[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_AND, DYN_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_CMP, 0 }, { MSG_ORIG(MSG_STR_MINUS_DYNNDX), /* MSG_INTL(MSG_OPTDESC_DYNNDX_VAL) */ ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_VAL), ELFEDIT_CMDOA_F_VALUE, DYN_OPT_F_DYNNDX_VAL, DYN_OPT_F_NEEDED }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_NEEDED), /* MSG_INTL(MSG_OPTDESC_NEEDED) */ ELFEDIT_I18NHDL(MSG_OPTDESC_NEEDED), ELFEDIT_CMDOA_F_VALUE, DYN_OPT_F_NEEDED, DYN_OPT_F_DYNNDX_VAL }, - { MSG_ORIG(MSG_STR_PREFIX), NULL, 0, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { MSG_ORIG(MSG_STR_PREFIX), 0, 0, 0 }, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_OR, DYN_OPT_F_AND }, { NULL } }; diff --git a/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c b/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c index fe377df0eb..8de483834a 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c @@ -140,7 +140,7 @@ typedef enum { */ typedef struct { elfedit_obj_state_t *obj_state; - ehdr_opt_t optmask; /* Mask of options used */ + ehdr_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ } ARGSTATE; @@ -1763,7 +1763,7 @@ elfedit_init(elfedit_module_version_t version) { /* Many of the commands only accept -o */ static elfedit_cmd_optarg_t opt_std[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; @@ -1861,13 +1861,13 @@ elfedit_init(elfedit_module_version_t version) static const char *name_e_flags[] = { MSG_ORIG(MSG_CMD_E_FLAGS), NULL }; static elfedit_cmd_optarg_t opt_e_flags[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_AND, EHDR_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_CMP, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_OR, EHDR_OPT_F_AND }, { NULL } }; @@ -1938,7 +1938,7 @@ elfedit_init(elfedit_module_version_t version) static const char *name_e_shstrndx[] = { MSG_ORIG(MSG_CMD_E_SHSTRNDX), NULL }; static elfedit_cmd_optarg_t opt_e_shstrndx[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ diff --git a/usr/src/cmd/sgs/elfedit/modules/common/phdr.c b/usr/src/cmd/sgs/elfedit/modules/common/phdr.c index e4129c9de1..0300913f2e 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/phdr.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/phdr.c @@ -130,7 +130,7 @@ typedef enum { */ typedef struct { elfedit_obj_state_t *obj_state; - phdr_opt_t optmask; /* Mask of options used */ + phdr_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ int ndx_set; /* True if ndx is valid */ @@ -1078,7 +1078,7 @@ elfedit_init(elfedit_module_version_t version) { /* Multiple commands accept a standard set of options */ static elfedit_cmd_optarg_t opt_std[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_PHNDX), /* MSG_INTL(MSG_OPTDESC_PHNDX) */ @@ -1203,17 +1203,17 @@ elfedit_init(elfedit_module_version_t version) static const char *name_p_flags[] = { MSG_ORIG(MSG_CMD_P_FLAGS), NULL }; static elfedit_cmd_optarg_t opt_p_flags[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_AND, PHDR_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_CMP, 0 }, { MSG_ORIG(MSG_STR_MINUS_PHNDX), /* MSG_INTL(MSG_OPTDESC_PHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_PHNDX), 0, PHDR_OPT_F_PHNDX, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_OR, PHDR_OPT_F_AND }, { NULL } }; @@ -1247,7 +1247,7 @@ elfedit_init(elfedit_module_version_t version) /* phdr:interp */ static const char *name_interp[] = { MSG_ORIG(MSG_CMD_INTERP), NULL }; static elfedit_cmd_optarg_t opt_interp[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; diff --git a/usr/src/cmd/sgs/elfedit/modules/common/shdr.c b/usr/src/cmd/sgs/elfedit/modules/common/shdr.c index 72881d02f9..e35906f0cb 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/shdr.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/shdr.c @@ -120,7 +120,7 @@ typedef enum { */ typedef struct { elfedit_obj_state_t *obj_state; - shdr_opt_t optmask; /* Mask of options used */ + shdr_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ } ARGSTATE; @@ -216,7 +216,7 @@ print_shdr(SHDR_CMD_T cmd, int autoprint, ARGSTATE *argstate, Ehdr *ehdr = argstate->obj_state->os_ehdr; uchar_t osabi = ehdr->e_ident[EI_OSABI]; Half mach = ehdr->e_machine; - elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx]; + elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx]; if ((autoprint && ((elfedit_flags() & ELFEDIT_F_AUTOPRINT) == 0)) || @@ -939,7 +939,7 @@ elfedit_init(elfedit_module_version_t version) { /* Multiple commands accept only the standard set of options */ static elfedit_cmd_optarg_t opt_std[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ @@ -957,7 +957,7 @@ elfedit_init(elfedit_module_version_t version) * plus -value_shnam and -value_shtyp. */ static elfedit_cmd_optarg_t opt_infolink[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ @@ -1052,13 +1052,13 @@ elfedit_init(elfedit_module_version_t version) static const char *name_sh_flags[] = { MSG_ORIG(MSG_CMD_SH_FLAGS), NULL }; static elfedit_cmd_optarg_t opt_sh_flags[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_AND, SHDR_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_CMP, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_OR, SHDR_OPT_F_AND }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ @@ -1120,7 +1120,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_NAME_OFFSET) */ ELFEDIT_I18NHDL(MSG_OPTDESC_NAME_OFFSET), 0, SHDR_OPT_F_NAMOFFSET, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ diff --git a/usr/src/cmd/sgs/elfedit/modules/common/str.c b/usr/src/cmd/sgs/elfedit/modules/common/str.c index 968bf5d214..2767284a11 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/str.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/str.c @@ -111,7 +111,7 @@ typedef enum { */ typedef struct { elfedit_obj_state_t *obj_state; - str_opt_t optmask; /* Mask of options used */ + str_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ @@ -750,7 +750,7 @@ cpl_sh_opt(elfedit_obj_state_t *obj_state, void *cpldata, int argc, { enum { NAME, INDEX, TYPE } op; elfedit_section_t *sec; - Word ndx; + Word ndx; if ((argc != num_opt) || (argc < 2)) return; @@ -948,23 +948,23 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_ANY) */ ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0, STR_OPT_F_ANY, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNAM), /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_STRNDX), /* MSG_INTL(MSG_OPTDESC_STRNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0, @@ -987,7 +987,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_ANY) */ ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0, STR_OPT_F_ANY, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_NOTERM), /* MSG_INTL(MSG_OPTDESC_NOTERM) */ @@ -997,17 +997,17 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_STRNDX), /* MSG_INTL(MSG_OPTDESC_STRNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0, @@ -1030,23 +1030,23 @@ elfedit_init(elfedit_module_version_t version) static const char *name_add[] = { MSG_ORIG(MSG_CMD_ADD), NULL }; static elfedit_cmd_optarg_t opt_add[] = { - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNAM), /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { NULL } }; static elfedit_cmd_optarg_t arg_add[] = { @@ -1065,23 +1065,23 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_ANY) */ ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0, STR_OPT_F_ANY, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNAM), /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_STRNDX), /* MSG_INTL(MSG_OPTDESC_STRNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0, diff --git a/usr/src/cmd/sgs/elfedit/modules/common/sym.c b/usr/src/cmd/sgs/elfedit/modules/common/sym.c index 40e3a30e2e..5b0ec36291 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/sym.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/sym.c @@ -116,7 +116,7 @@ typedef enum { /* index section */ SYM_OPT_F_NAMOFFSET = 2, /* -name_offset: sym:st_name name arg */ /* is numeric offset */ - /* rather than ASCII string */ + /* rather than ASCII string */ SYM_OPT_F_SECSHNDX = 4, /* -secshndx: Section arg is */ /* section index, not name */ SYM_OPT_F_SECSHTYP = 8, /* -secshtyp: Section arg is */ @@ -171,7 +171,7 @@ typedef struct { } SYMSTATE; typedef struct { elfedit_obj_state_t *obj_state; - sym_opt_t optmask; /* Mask of options used */ + sym_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ int numsymstate; /* # of items in symstate[] */ @@ -1471,7 +1471,7 @@ cpl_sh_opt(elfedit_obj_state_t *obj_state, void *cpldata, int argc, { enum { NAME, INDEX, TYPE } op; elfedit_symtab_t *symtab; - Word tblndx; + Word tblndx; if ((argc != num_opt) || (argc < 2)) return; @@ -1689,21 +1689,21 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, SYM_OPT_F_SYMNDX }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0 }, { NULL } }; @@ -1719,17 +1719,17 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, SYM_OPT_F_SYMNDX }, @@ -1781,17 +1781,17 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, @@ -1800,7 +1800,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_NAME_OFFSET) */ ELFEDIT_I18NHDL(MSG_OPTDESC_NAME_OFFSET), 0, SYM_OPT_F_NAMOFFSET, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { NULL } }; @@ -1842,22 +1842,22 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_SHNAM) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_NAME), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_NAME), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHNDX), /* MSG_INTL(MSG_OPTDESC_SHNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP }, - { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SHTYP), /* MSG_INTL(MSG_OPTDESC_SHTYP) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE, SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX }, - { MSG_ORIG(MSG_STR_TYPE), NULL, 0, 0 }, + { MSG_ORIG(MSG_STR_TYPE), 0, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, SYM_OPT_F_SYMNDX, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SECSHNDX), /* MSG_INTL(MSG_OPTDESC_SECSHNDX) */ diff --git a/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c b/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c index c06f3be6cb..59b78c8587 100644 --- a/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c +++ b/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c @@ -109,7 +109,7 @@ typedef enum { */ typedef struct { elfedit_obj_state_t *obj_state; - syminfo_opt_t optmask; /* Mask of options used */ + syminfo_opt_t optmask; /* Mask of options used */ int argc; /* # of plain arguments */ const char **argv; /* Plain arguments */ struct { /* Syminfo */ @@ -796,7 +796,7 @@ elfedit_init(elfedit_module_version_t version) /* MSG_INTL(MSG_OPTDESC_NEEDED) */ ELFEDIT_I18NHDL(MSG_OPTDESC_NEEDED), 0, SYMINFO_OPT_F_NEEDED, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ @@ -820,13 +820,13 @@ elfedit_init(elfedit_module_version_t version) static const char *name_si_flags[] = { MSG_ORIG(MSG_CMD_SI_FLAGS), NULL }; static elfedit_cmd_optarg_t opt_si_flags[] = { - { ELFEDIT_STDOA_OPT_AND, NULL, ELFEDIT_CMDOA_F_INHERIT, + { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT, SYMINFO_OPT_F_AND, SYMINFO_OPT_F_OR }, - { ELFEDIT_STDOA_OPT_CMP, NULL, + { ELFEDIT_STDOA_OPT_CMP, 0, ELFEDIT_CMDOA_F_INHERIT, SYMINFO_OPT_F_CMP, 0 }, - { ELFEDIT_STDOA_OPT_O, NULL, + { ELFEDIT_STDOA_OPT_O, 0, ELFEDIT_CMDOA_F_INHERIT, 0, 0 }, - { ELFEDIT_STDOA_OPT_OR, NULL, ELFEDIT_CMDOA_F_INHERIT, + { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT, SYMINFO_OPT_F_OR, SYMINFO_OPT_F_AND }, { MSG_ORIG(MSG_STR_MINUS_SYMNDX), /* MSG_INTL(MSG_OPTDESC_SYMNDX) */ diff --git a/usr/src/cmd/sgs/libld/common/machrel.amd.c b/usr/src/cmd/sgs/libld/common/machrel.amd.c index dbdae79bd1..4361980887 100644 --- a/usr/src/cmd/sgs/libld/common/machrel.amd.c +++ b/usr/src/cmd/sgs/libld/common/machrel.amd.c @@ -1322,7 +1322,7 @@ ld_reloc_local(Rel_desc * rsp, Ofl_desc * ofl) /* * Perform relocation. */ - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } @@ -1389,7 +1389,7 @@ ld_reloc_TLS(Boolean local, Rel_desc * rsp, Ofl_desc * ofl) GOT_REF_TLSLD, ofl, rsp)) == NULL)) { if (ld_assign_got_TLS(local, rsp, ofl, sdp, gnp, GOT_REF_TLSLD, - FLG_REL_MTLS, rtype, R_AMD64_DTPMOD64, NULL) == S_ERROR) + FLG_REL_MTLS, rtype, R_AMD64_DTPMOD64, 0) == S_ERROR) return (S_ERROR); } else if (IS_TLS_GD(rtype) && diff --git a/usr/src/cmd/sgs/libld/common/machrel.intel.c b/usr/src/cmd/sgs/libld/common/machrel.intel.c index d2b72c78a6..65c5908f51 100644 --- a/usr/src/cmd/sgs/libld/common/machrel.intel.c +++ b/usr/src/cmd/sgs/libld/common/machrel.intel.c @@ -1269,7 +1269,7 @@ ld_reloc_local(Rel_desc * rsp, Ofl_desc * ofl) Word ortype = rsp->rel_rtype; rsp->rel_rtype = R_386_RELATIVE; - if (ld_add_outrel(NULL, rsp, ofl) == S_ERROR) + if (ld_add_outrel(0, rsp, ofl) == S_ERROR) return (S_ERROR); rsp->rel_rtype = ortype; } @@ -1313,7 +1313,7 @@ ld_reloc_local(Rel_desc * rsp, Ofl_desc * ofl) /* * Perform relocation. */ - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } static uintptr_t @@ -1343,7 +1343,7 @@ ld_reloc_TLS(Boolean local, Rel_desc * rsp, Ofl_desc * ofl) if (ld_assign_got_TLS(local, rsp, ofl, sdp, gnp, GOT_REF_TLSIE, FLG_REL_STLS, - rtype, R_386_TLS_TPOFF, NULL) == S_ERROR) + rtype, R_386_TLS_TPOFF, 0) == S_ERROR) return (S_ERROR); } @@ -1362,7 +1362,7 @@ ld_reloc_TLS(Boolean local, Rel_desc * rsp, Ofl_desc * ofl) if (((flags & FLG_OF_EXEC) == 0) && (rtype == R_386_TLS_IE)) { rsp->rel_rtype = R_386_RELATIVE; - return (ld_add_outrel(NULL, rsp, ofl)); + return (ld_add_outrel(0, rsp, ofl)); } return (1); } @@ -1393,7 +1393,7 @@ ld_reloc_TLS(Boolean local, Rel_desc * rsp, Ofl_desc * ofl) GOT_REF_TLSLD, ofl, NULL)) == NULL)) { if (ld_assign_got_TLS(local, rsp, ofl, sdp, gnp, GOT_REF_TLSLD, - FLG_REL_MTLS, rtype, R_386_TLS_DTPMOD32, NULL) == S_ERROR) + FLG_REL_MTLS, rtype, R_386_TLS_DTPMOD32, 0) == S_ERROR) return (S_ERROR); } else if (IS_TLS_GD(rtype) && ((gnp = ld_find_got_ndx(sdp->sd_GOTndxs, diff --git a/usr/src/cmd/sgs/libld/common/machrel.sparc.c b/usr/src/cmd/sgs/libld/common/machrel.sparc.c index 02d180b1c2..93843960e4 100644 --- a/usr/src/cmd/sgs/libld/common/machrel.sparc.c +++ b/usr/src/cmd/sgs/libld/common/machrel.sparc.c @@ -1693,7 +1693,7 @@ ld_reloc_local(Rel_desc *rsp, Ofl_desc *ofl) /* * Perform relocation. */ - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1777,7 +1777,7 @@ ld_reloc_TLS(Boolean local, Rel_desc *rsp, Ofl_desc *ofl) if (ld_assign_got_TLS(local, rsp, ofl, sdp, gnp, GOT_REF_TLSIE, FLG_REL_STLS, - rtype, M_R_TPOFF, NULL) == S_ERROR) + rtype, M_R_TPOFF, 0) == S_ERROR) return (S_ERROR); } diff --git a/usr/src/cmd/sgs/libld/common/relocate.c b/usr/src/cmd/sgs/libld/common/relocate.c index a1c30c5d56..27c9a5de7f 100644 --- a/usr/src/cmd/sgs/libld/common/relocate.c +++ b/usr/src/cmd/sgs/libld/common/relocate.c @@ -923,7 +923,7 @@ ld_reloc_GOT_relative(Boolean local, Rel_desc *rsp, Ofl_desc *ofl) /* * Perform relocation to GOT table entry. */ - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1002,7 +1002,7 @@ ld_reloc_plt(Rel_desc *rsp, Ofl_desc *ofl) rsp->rel_rtype = ortype; return (1); } else - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1043,14 +1043,14 @@ reloc_exec(Rel_desc *rsp, Ofl_desc *ofl) */ if ((sdp->sd_flags & FLG_SY_SPECSEC) && (sym->st_shndx == SHN_ABS)) { if ((ofl->ofl_flags1 & FLG_OF1_ABSEXEC) == 0) - return ((*ld_targ.t_mr.mr_add_outrel)(NULL, rsp, ofl)); + return ((*ld_targ.t_mr.mr_add_outrel)(0, rsp, ofl)); /* * If -zabsexec is set then promote the ABSOLUTE symbol to * current the current object and perform the relocation now. */ sdp->sd_ref = REF_REL_NEED; - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1064,9 +1064,9 @@ reloc_exec(Rel_desc *rsp, Ofl_desc *ofl) if ((ELF_ST_TYPE(sym->st_info) == STT_OBJECT) && (RELAUX_GET_OSDESC(rsp)->os_shdr->sh_flags & SHF_WRITE)) { if (sdp->sd_flags & FLG_SY_MVTOCOMM) - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); else - return ((*ld_targ.t_mr.mr_add_outrel)(NULL, rsp, ofl)); + return ((*ld_targ.t_mr.mr_add_outrel)(0, rsp, ofl)); } /* @@ -1083,7 +1083,7 @@ reloc_exec(Rel_desc *rsp, Ofl_desc *ofl) ELF_ST_TYPE(sym->st_info), 0, &inv_buf), rsp->rel_isdesc->is_file->ifl_name, ld_reloc_sym_name(rsp), sdp->sd_file->ifl_name); - return ((*ld_targ.t_mr.mr_add_outrel)(NULL, rsp, ofl)); + return ((*ld_targ.t_mr.mr_add_outrel)(0, rsp, ofl)); } /* @@ -1279,7 +1279,7 @@ reloc_exec(Rel_desc *rsp, Ofl_desc *ofl) DBG_CALL(Dbg_syms_copy_reloc(ofl, _sdp, _sdp->sd_sym->st_value)); } - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1302,12 +1302,12 @@ reloc_generic(Rel_desc *rsp, Ofl_desc *ofl) * until runtime. */ if (ofl->ofl_flags & FLG_OF_SHAROBJ) - return ((*ld_targ.t_mr.mr_add_outrel)(NULL, rsp, ofl)); + return ((*ld_targ.t_mr.mr_add_outrel)(0, rsp, ofl)); /* * Otherwise process relocation now. */ - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); } /* @@ -1321,7 +1321,7 @@ reloc_relobj(Boolean local, Rel_desc *rsp, Ofl_desc *ofl) Word rtype = rsp->rel_rtype; Sym_desc *sdp = rsp->rel_sym; Is_desc *isp = rsp->rel_isdesc; - Word oflags = NULL; + Word oflags = 0; /* * Determine if we can do any relocations at this point. We can if: @@ -1334,7 +1334,7 @@ reloc_relobj(Boolean local, Rel_desc *rsp, Ofl_desc *ofl) !IS_GOT_BASED(rtype) && !IS_GOT_PC(rtype) && IS_PC_RELATIVE(rtype) && ((sdp->sd_isc) && (sdp->sd_isc->is_osdesc == isp->is_osdesc))) - return (ld_add_actrel(NULL, rsp, ofl)); + return (ld_add_actrel(0, rsp, ofl)); /* * If -zredlocsym is in effect, translate all local symbol relocations @@ -1382,7 +1382,7 @@ reloc_relobj(Boolean local, Rel_desc *rsp, Ofl_desc *ofl) */ if ((ELF_ST_TYPE(sdp->sd_sym->st_info) == STT_SECTION) || (oflags == FLG_REL_SCNNDX)) - if (ld_add_actrel(NULL, rsp, ofl) == S_ERROR) + if (ld_add_actrel(0, rsp, ofl) == S_ERROR) return (S_ERROR); } return ((*ld_targ.t_mr.mr_add_outrel)(oflags, rsp, ofl)); @@ -1673,7 +1673,7 @@ ld_process_sym_reloc(Ofl_desc *ofl, Rel_desc *reld, Rel *reloc, Is_desc *isp, if ((sdp->sd_ref == REF_REL_NEED) || (flags & FLG_OF_BFLAG) || (flags & FLG_OF_SHAROBJ) || (ELF_ST_TYPE(sdp->sd_sym->st_info) == STT_NOTYPE)) - return ((*ld_targ.t_mr.mr_add_outrel)(NULL, reld, ofl)); + return ((*ld_targ.t_mr.mr_add_outrel)(0, reld, ofl)); if (sdp->sd_ref == REF_DYN_NEED) return (reloc_exec(reld, ofl)); diff --git a/usr/src/cmd/sgs/libld/common/sections.c b/usr/src/cmd/sgs/libld/common/sections.c index 696a18ec40..22b2655105 100644 --- a/usr/src/cmd/sgs/libld/common/sections.c +++ b/usr/src/cmd/sgs/libld/common/sections.c @@ -1695,7 +1695,7 @@ make_cap(Ofl_desc *ofl, Word shtype, const char *shname, int ident) } if (size == 0) - return (NULL); + return (0); if (new_section(ofl, shtype, shname, size, &isec, &shdr, &data) == S_ERROR) @@ -2380,7 +2380,7 @@ make_dynstr(Ofl_desc *ofl) (ELF_ST_BIND(sdp->sd_sym->st_info) != STB_LOCAL)) continue; - if (sdp->sd_sym->st_name == NULL) + if (sdp->sd_sym->st_name == 0) continue; if (st_insert(ofl->ofl_dynstrtab, sdp->sd_name) == -1) diff --git a/usr/src/cmd/sgs/libld/common/update.c b/usr/src/cmd/sgs/libld/common/update.c index ccd26beb5e..7626520cd7 100644 --- a/usr/src/cmd/sgs/libld/common/update.c +++ b/usr/src/cmd/sgs/libld/common/update.c @@ -207,7 +207,7 @@ update_osym(Ofl_desc *ofl) Word *symshndx = NULL; /* .symtab_shndx table */ Word *dynshndx = NULL; /* .dynsym_shndx table */ Word *ldynshndx = NULL; /* .SUNW_ldynsym_shndx table */ - Word ldynsym_cnt = NULL; /* number of items in */ + Word ldynsym_cnt = 0; /* number of items in */ /* .SUNW_ldynsym */ Str_tbl *shstrtab; Str_tbl *strtab; @@ -307,7 +307,7 @@ update_osym(Ofl_desc *ofl) if (!(flags & FLG_OF_NOVERSEC) && (flags & (FLG_OF_VERNEED | FLG_OF_VERDEF))) { versym = (Versym *)ofl->ofl_osversym->os_outdata->d_buf; - versym[0] = NULL; + versym[0] = 0; } else versym = NULL; @@ -1607,7 +1607,7 @@ update_osym(Ofl_desc *ofl) DBG_CALL(Dbg_syms_old(ofl, sdp)); - spec = NULL; + spec = 0; /* * assign new symbol value. */ diff --git a/usr/src/cmd/sgs/librtld_db/common/rd_elf.c b/usr/src/cmd/sgs/librtld_db/common/rd_elf.c index b3de685b81..c78d39e714 100644 --- a/usr/src/cmd/sgs/librtld_db/common/rd_elf.c +++ b/usr/src/cmd/sgs/librtld_db/common/rd_elf.c @@ -152,7 +152,7 @@ validate_rdebug32(struct rd_agent *rap) rd_err_e find_dynamic_ent32(struct rd_agent *rap, psaddr_t dynaddr, - Xword dyntag, Dyn *dyn) + Xword dyntag, Dyn *dyn) { struct ps_prochandle *php = rap->rd_psp; Dyn d; @@ -570,7 +570,7 @@ _rd_objpad_enable32(struct rd_agent *rap, size_t padsize) static rd_err_e iter_map(rd_agent_t *rap, unsigned long ident, psaddr_t lmaddr, - rl_iter_f *cb, void *client_data, uint_t *abort_iterp) + rl_iter_f *cb, void *client_data, uint_t *abort_iterp) { while (lmaddr) { Rt_map rmap; @@ -724,7 +724,7 @@ _rd_loadobj_iter32_native(rd_agent_t *rap, rl_iter_f *cb, void *client_data, return (RD_DBERR); } - if (db_priv.rtd_dynlmlst == NULL) { + if (db_priv.rtd_dynlmlst == 0) { LOG(ps_plog(MSG_ORIG(MSG_DB_LKMAPNOINIT), EC_ADDR((uintptr_t)db_priv.rtd_dynlmlst))); return (RD_NOMAPS); @@ -737,7 +737,7 @@ _rd_loadobj_iter32_native(rd_agent_t *rap, rl_iter_f *cb, void *client_data, return (RD_DBERR); } - if (addr == NULL) { + if (addr == 0) { LOG(ps_plog(MSG_ORIG(MSG_DB_LKMAPNOINIT_1), EC_ADDR((uintptr_t)db_priv.rtd_dynlmlst))); return (RD_NOMAPS); diff --git a/usr/src/cmd/sgs/mcs/common/file.c b/usr/src/cmd/sgs/mcs/common/file.c index 7fbf0af943..af6d7b8e0a 100644 --- a/usr/src/cmd/sgs/mcs/common/file.c +++ b/usr/src/cmd/sgs/mcs/common/file.c @@ -43,8 +43,8 @@ typedef struct { Seg_Table *b_e_seg_table; section_info_table *sec_table; int64_t *off_table; /* maintains section's offset; set to */ - /* retain old offset, else 0 */ - int64_t *nobits_table; /* maintains NOBITS sections */ + /* retain old offset, else 0 */ + int64_t *nobits_table; /* maintains NOBITS sections */ char *new_sec_string; } file_state_t; @@ -115,7 +115,7 @@ each_file(char *cur_file, Cmd_Info *cmd_info) artmpfile.tmp_name = tempnam(TMPDIR, "mcs2"); if ((fdartmp = open(artmpfile.tmp_name, O_WRONLY | O_APPEND | O_CREAT, - (mode_t)0666)) == NULL) { + (mode_t)0666)) == 0) { error_message(OPEN_TEMP_ERROR, SYSTEM_ERROR, strerror(errno), prog, artmpfile); @@ -313,17 +313,17 @@ static int traverse_file(Elf *elf, GElf_Ehdr * ehdr, char *cur_file, Cmd_Info *cmd_info, file_state_t *state) { - Elf_Scn * scn; - Elf_Scn * temp_scn; - Elf_Data * data; - GElf_Shdr * shdr; - char *temp_name; - section_info_table * sinfo; - GElf_Xword x; - int ret = 0, SYM = 0; /* used by strip command */ - int phnum = ehdr->e_phnum; - unsigned int i, scn_index; - size_t shstrndx, shnum; + Elf_Scn *scn; + Elf_Scn *temp_scn; + Elf_Data *data; + GElf_Shdr *shdr; + char *temp_name; + section_info_table *sinfo; + GElf_Xword x; + int ret = 0, SYM = 0; /* used by strip command */ + int phnum = ehdr->e_phnum; + unsigned int i, scn_index; + size_t shstrndx, shnum; state->Sect_exists = 0; @@ -716,7 +716,7 @@ build_file(Elf *src_elf, GElf_Ehdr *src_ehdr, Cmd_Info *cmd_info, return (FAILURE); } - if (gelf_newehdr(dst_elf, gelf_getclass(src_elf)) == NULL) { + if (gelf_newehdr(dst_elf, gelf_getclass(src_elf)) == 0) { error_message(LIBELF_ERROR, LIBelf_ERROR, elf_errmsg(-1), prog); return (FAILURE); } @@ -743,7 +743,7 @@ build_file(Elf *src_elf, GElf_Ehdr *src_ehdr, Cmd_Info *cmd_info, if (src_ehdr->e_phnum != 0) { (void) elf_flagelf(dst_elf, ELF_C_SET, ELF_F_LAYOUT); - if (gelf_newphdr(dst_elf, src_ehdr->e_phnum) == NULL) { + if (gelf_newphdr(dst_elf, src_ehdr->e_phnum) == 0) { error_message(LIBELF_ERROR, LIBelf_ERROR, elf_errmsg(-1), prog); return (FAILURE); @@ -1041,7 +1041,7 @@ build_file(Elf *src_elf, GElf_Ehdr *src_ehdr, Cmd_Info *cmd_info, dst_shdr.sh_type = SHT_PROGBITS; dst_shdr.sh_flags = 0; dst_shdr.sh_addr = 0; - if (src_ehdr->e_phnum != NULL) + if (src_ehdr->e_phnum != 0) dst_shdr.sh_offset = new_offset; else dst_shdr.sh_offset = 0; diff --git a/usr/src/cmd/sgs/mcs/common/utils.c b/usr/src/cmd/sgs/mcs/common/utils.c index 221fbab834..0016c27b25 100644 --- a/usr/src/cmd/sgs/mcs/common/utils.c +++ b/usr/src/cmd/sgs/mcs/common/utils.c @@ -466,7 +466,7 @@ compress(char *str, size_t *size) mcs_exit(FAILURE); } } - strings[next_str++] = NULL; + strings[next_str++] = '\0'; /* * End get string */ @@ -528,7 +528,7 @@ dohash(char *str) unsigned shift; int t; sum = 1; - for (shift = 0; (t = *str++) != NULL; shift += 7) { + for (shift = 0; (t = *str++) != 0; shift += 7) { sum += (long)t << (shift %= HALFLONG); } sum = low(sum) + high(sum); |
