diff options
author | Ali Bahrami <Ali.Bahrami@Oracle.COM> | 2010-06-30 09:18:21 -0600 |
---|---|---|
committer | Ali Bahrami <Ali.Bahrami@Oracle.COM> | 2010-06-30 09:18:21 -0600 |
commit | b23a7923c0fe493ed4beebaf775ad634ea217080 (patch) | |
tree | 54b0138034309764fb395a867d50a689bdef3f98 /usr/src/cmd | |
parent | 67b092de9b70aa12adb12baf8718e6e8dbdb0bdb (diff) | |
download | illumos-gate-b23a7923c0fe493ed4beebaf775ad634ea217080.tar.gz |
6964517 OSnet mapfiles should use version 2 link-editor syntax (2nd pass)
6948720 SHT_INIT_ARRAY etc. section names don't follow ELF gABI
6962343 sgsmsg should use mkstemp() for temporary file creation
Diffstat (limited to 'usr/src/cmd')
-rw-r--r-- | usr/src/cmd/fs.d/nfs/rp_basic/mapfile-vers | 7 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/common/elfdump.msg | 9 | ||||
-rw-r--r-- | usr/src/cmd/sgs/include/libld.h | 6 | ||||
-rw-r--r-- | usr/src/cmd/sgs/include/rtld.h | 12 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/common/libld.msg | 12 | ||||
-rw-r--r-- | usr/src/cmd/sgs/packages/common/SUNWonld-README | 3 | ||||
-rw-r--r-- | usr/src/cmd/sgs/tools/common/sgsmsg.c | 8 |
7 files changed, 30 insertions, 27 deletions
diff --git a/usr/src/cmd/fs.d/nfs/rp_basic/mapfile-vers b/usr/src/cmd/fs.d/nfs/rp_basic/mapfile-vers index 7a1e01b707..85632602bf 100644 --- a/usr/src/cmd/fs.d/nfs/rp_basic/mapfile-vers +++ b/usr/src/cmd/fs.d/nfs/rp_basic/mapfile-vers @@ -19,8 +19,7 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # # @@ -37,7 +36,9 @@ # MAPFILE HEADER END # -SUNWprivate_1.1 { +$mapfile_version 2 + +SYMBOL_VERSION SUNWprivate_1.1 { global: rp_plugin_ops; local: diff --git a/usr/src/cmd/sgs/elfdump/common/elfdump.msg b/usr/src/cmd/sgs/elfdump/common/elfdump.msg index 4eeaf1c190..5735d19b53 100644 --- a/usr/src/cmd/sgs/elfdump/common/elfdump.msg +++ b/usr/src/cmd/sgs/elfdump/common/elfdump.msg @@ -20,8 +20,7 @@ # # -# Copyright 2010 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. # @ _START_ @@ -621,14 +620,14 @@ @ MSG_PHDRNAM_DYN ".dynamic(phdr)" @ MSG_PHDRNAM_DYNSTR ".dynstr(phdr)" @ MSG_PHDRNAM_DYNSYM ".dynsym(phdr)" -@ MSG_PHDRNAM_FINIARR ".finiarray(phdr)" +@ MSG_PHDRNAM_FINIARR ".fini_array(phdr)" @ MSG_PHDRNAM_HASH ".hash(phdr)" -@ MSG_PHDRNAM_INITARR ".initarray(phdr)" +@ MSG_PHDRNAM_INITARR ".init_array(phdr)" @ MSG_PHDRNAM_INTERP ".interp(phdr)" @ MSG_PHDRNAM_LDYNSYM ".SUNW_ldynsym(phdr)" @ MSG_PHDRNAM_MOVE ".move(phdr)" @ MSG_PHDRNAM_NOTE ".note(phdr)" -@ MSG_PHDRNAM_PREINITARR ".preinitarray(phdr)" +@ MSG_PHDRNAM_PREINITARR ".preinit_array(phdr)" @ MSG_PHDRNAM_REL ".rel(phdr)" @ MSG_PHDRNAM_RELA ".rela(phdr)" @ MSG_PHDRNAM_SYMINFO ".syminfo(phdr)" diff --git a/usr/src/cmd/sgs/include/libld.h b/usr/src/cmd/sgs/include/libld.h index c8629fa3f5..f390d7c15c 100644 --- a/usr/src/cmd/sgs/include/libld.h +++ b/usr/src/cmd/sgs/include/libld.h @@ -364,9 +364,9 @@ struct ofl_desc { Os_desc *ofl_osdyntlssort; /* .SUNW_dyntlssort output section */ Os_desc *ofl_osgot; /* .got output section */ Os_desc *ofl_oshash; /* .hash output section */ - Os_desc *ofl_osinitarray; /* .initarray output section */ - Os_desc *ofl_osfiniarray; /* .finiarray output section */ - Os_desc *ofl_ospreinitarray; /* .preinitarray output section */ + Os_desc *ofl_osinitarray; /* .init_array output section */ + Os_desc *ofl_osfiniarray; /* .fini_array output section */ + Os_desc *ofl_ospreinitarray; /* .preinit_array output section */ Os_desc *ofl_osinterp; /* .interp output section */ Os_desc *ofl_oscap; /* .SUNW_cap output section */ Os_desc *ofl_oscapinfo; /* .SUNW_capinfo output section */ diff --git a/usr/src/cmd/sgs/include/rtld.h b/usr/src/cmd/sgs/include/rtld.h index eaffdeb543..8953dc3125 100644 --- a/usr/src/cmd/sgs/include/rtld.h +++ b/usr/src/cmd/sgs/include/rtld.h @@ -702,14 +702,14 @@ struct rt_map { Syminfo *rt_syminfo; /* elf .syminfo section - here */ /* because it is checked in */ /* common code */ - Addr *rt_initarray; /* .initarray table */ - Addr *rt_finiarray; /* .finiarray table */ - Addr *rt_preinitarray; /* .preinitarray table */ + Addr *rt_initarray; /* .init_array table */ + Addr *rt_finiarray; /* .fini_array table */ + Addr *rt_preinitarray; /* .preinit_array table */ mmapobj_result_t *rt_mmaps; /* array of mapping information */ uint_t rt_mmapcnt; /* and associated number */ - uint_t rt_initarraysz; /* size of .initarray table */ - uint_t rt_finiarraysz; /* size of .finiarray table */ - uint_t rt_preinitarraysz; /* size of .preinitarray table */ + uint_t rt_initarraysz; /* size of .init_array table */ + uint_t rt_finiarraysz; /* size of .fini_array table */ + uint_t rt_preinitarraysz; /* size of .preinit_array table */ Dyninfo *rt_dyninfo; /* .dynamic information descriptors */ uint_t rt_dyninfocnt; /* count of dyninfo entries */ uint_t rt_relacount; /* no. of RELATIVE relocations */ diff --git a/usr/src/cmd/sgs/libld/common/libld.msg b/usr/src/cmd/sgs/libld/common/libld.msg index f8a951602f..0989326f2b 100644 --- a/usr/src/cmd/sgs/libld/common/libld.msg +++ b/usr/src/cmd/sgs/libld/common/libld.msg @@ -156,7 +156,7 @@ terminate a filters\n\t\t\tsearch\n" @ MSG_ARG_DETAIL_ZFA "\t[-z finiarray=function]\n\ \t\t\tname of function to be appended to the \ - .finiarray\n" + .fini_array\n" @ MSG_ARG_DETAIL_ZGP "\t[-z groupperm | nogroupperm]\n\ \t\t\tenable|disable setting of group permissions\n\ \t\t\ton dynamic dependencies\n" @@ -166,7 +166,7 @@ \t\t\tignore|record unused dynamic dependencies\n" @ MSG_ARG_DETAIL_ZINA "\t[-z initarray=function]\n\ \t\t\tname of function to be appended to the \ - .initarray\n" + .init_array\n" @ MSG_ARG_DETAIL_ZINI "\t[-z initfirst]\tmark object to indicate that its \ .init section should\n\ \t\t\tbe executed before the .init section of any \ @@ -205,7 +205,7 @@ processing\n" @ MSG_ARG_DETAIL_ZPIA "\t[-z preinitarray=function]\n\ \t\t\tname of function to be appended to the \ - .preinitarray\n" + .preinit_array\n" @ MSG_ARG_DETAIL_ZRL "\t[-z redlocsym]\treduce local syms in .symtab to \ a minimum\n" @ MSG_ARG_DETAIL_ZRREL "\t[-z relaxreloc]\trelax rules used for relocations \ @@ -749,20 +749,20 @@ @ MSG_SCN_EX_RANGES ".exception_ranges" @ MSG_SCN_EXCL ".excl" @ MSG_SCN_FINI ".fini" -@ MSG_SCN_FINIARRAY ".finiarray" +@ MSG_SCN_FINIARRAY ".fini_array" @ MSG_SCN_GOT ".got" @ MSG_SCN_GNU_LINKONCE ".gnu.linkonce." @ MSG_SCN_HASH ".hash" @ MSG_SCN_INDEX ".index" @ MSG_SCN_INIT ".init" -@ MSG_SCN_INITARRAY ".initarray" +@ MSG_SCN_INITARRAY ".init_array" @ MSG_SCN_INTERP ".interp" @ MSG_SCN_LBSS ".lbss" @ MSG_SCN_LDATA ".ldata" @ MSG_SCN_LINE ".line" @ MSG_SCN_LRODATA ".lrodata" @ MSG_SCN_PLT ".plt" -@ MSG_SCN_PREINITARRAY ".preinitarray" +@ MSG_SCN_PREINITARRAY ".preinit_array" @ MSG_SCN_REL ".rel" @ MSG_SCN_RELA ".rela" @ MSG_SCN_RODATA ".rodata" diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index a511b81869..8482db1e48 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1596,3 +1596,6 @@ Bugid Risk Synopsis variables. (D) 6748925 moe returns wrong hwcap library in some circumstances 6916796 OSnet mapfiles should use version 2 link-editor syntax +6964517 OSnet mapfiles should use version 2 link-editor syntax (2nd pass) +6948720 SHT_INIT_ARRAY etc. section names don't follow ELF gABI (D) +6962343 sgsmsg should use mkstemp() for temporary file creation diff --git a/usr/src/cmd/sgs/tools/common/sgsmsg.c b/usr/src/cmd/sgs/tools/common/sgsmsg.c index 8afdbddb82..1cdd584c74 100644 --- a/usr/src/cmd/sgs/tools/common/sgsmsg.c +++ b/usr/src/cmd/sgs/tools/common/sgsmsg.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. * * sgsmsg generates several message files from an input template file. Messages * are constructed for use with gettext(3i) - the default - or catgets(3c). The @@ -1129,8 +1128,9 @@ main(int argc, char ** argv) } } if (fddefs && fddata) { - (void) sprintf(fllint, "%s.%d", nmlint, (int)getpid()); - if ((fdlint = fopen(fllint, "w+")) == NULL) { + (void) sprintf(fllint, "%s.%d.XXXXXX", nmlint, (int)getpid()); + if ((mkstemp(fllint) == -1) || + ((fdlint = fopen(fllint, "w+")) == NULL)) { (void) fprintf(stderr, Errmsg_opne, fllint, strerror(errno)); return (1); |