5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
30 echo "usage: bld_vernote -R <revision> -r <release> -o <outfile.s>"
36 len
=$
(( ${#notestring} + $extra ))
37 padlen
=$
(( $len % 4 ))
38 while [[ $
(( $len % 4)) != 0 ]]
40 notestring
="${notestring}\0"
48 notestring
="Solaris Link Editors: $release-$revision (illumos)\0"
50 # The 'adjustment' is for the '\0'
60 .word .endname - .startname /* note name size */
61 .word 0 /* note desc size */
62 .word 0 /* note type */
67 .section ".rodata", #alloc
68 .global link_ver_string
70 .type link_ver_string, #object
71 .ascii "${release}-${revision} (illumos)\0"
72 .size link_ver_string, .-link_ver_string
78 notestring
="Solaris Link Editors: $release-$revision (illumos)"
80 # The 'adjustment' is for the the fact that the x86/amd64
81 # assembler automatically append a '\0' at the end of a string.
90 .long .endname - .startname /* note name size */
91 .long 0 /* note desc size */
92 .long 0 /* note type */
98 .globl link_ver_string
100 .type link_ver_string,@object
101 .string "${release}-${revision} (illumos)\0"
102 .size link_ver_string, .-link_ver_string
111 while getopts R
:o
:r
: c
130 if [[ ( -z $notefile ) ||
( -z $release ) ||
( -z $revision ) ]]; then
136 if [[ $MACH = "sparc" ]]; then
138 elif [[ $MACH = "i386" ]]; then
141 echo "I don't know how to build a vernote.s for ${MACH}, so sorry"