1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27 28@ _START_ 29 30# Message file for elfedit 'shdr' module 31 32@ MSG_ID_ELFEDIT_SHDR 33 34 35# Section header format 36@ MSG_ELF_SHDR "Section Header[%d]: sh_name: %s\n" 37 38# Debug messages 39 40@ MSG_DEBUG_S_OK "shdr[%d: %s].%s: value unchanged: %s\n" 41@ MSG_DEBUG_S_CHG "shdr[%d: %s].%s: change from %s to %s\n" 42@ MSG_DEBUG_LLX_OK "shdr[%d: %s].%s: value unchanged: %#llx\n" 43@ MSG_DEBUG_LLX_CHG "shdr[%d: %s].%s: change from %#llx to %#llx\n" 44@ MSG_DEBUG_D_OK "shdr[%d: %s].%s: value unchanged: %d\n" 45@ MSG_DEBUG_D_CHG "shdr[%d: %s].%s: change from %d to %d\n" 46@ MSG_DEBUG_CHGSHDR0 "ELF warning: Unexpected direct change to \ 47 section header [0]: Header [0] is used for \ 48 extended section and program headers by the ehdr \ 49 module, and should otherwise be completely zero\n" 50@ MSG_DEBUG_ADDRALIGN "ELF warning: sh_addralign value is expected to \ 51 be 0, 1, or a power of 2: %s\n" 52 53 54# Module description 55 56@ MSG_MOD_DESC "Section Header Array" 57 58 59# 1-line description strings 60 61@ MSG_DESC_DUMP "Dump Section Headers" 62 63@ MSG_DESC_SH_ADDR "Section memory address" 64@ MSG_DESC_SH_ADDRALIGN "Section address alignment" 65@ MSG_DESC_SH_ENTSIZE "Section per-item size" 66@ MSG_DESC_SH_FLAGS "Section flags" 67@ MSG_DESC_SH_INFO "Section info" 68@ MSG_DESC_SH_LINK "Section link" 69@ MSG_DESC_SH_NAME "Section name" 70@ MSG_DESC_SH_OFFSET "Section file offset" 71@ MSG_DESC_SH_SIZE "Section size (bytes)" 72@ MSG_DESC_SH_TYPE "Section type" 73 74 75# Command option description strings 76 77@ MSG_OPTDESC_SHNDX "\ 78 Interpret the sec argument as a section index rather than\n\ 79 as a section name. section can be one of the well known SHN_\n\ 80 symbolic constants, or any integer.\n" 81 82@ MSG_OPTDESC_SHTYP "\ 83 Interpret the sec argument as a section type rather than\n\ 84 as a section name. section can be one of the well known SHT_\n\ 85 symbolic constants, or any integer.\n" 86 87@ MSG_OPTDESC_NAME_OFFSET "\ 88 Interpret the name argument as a string table offset rather\n\ 89 than as a string.\n" 90 91 92# Command argument descriptions 93 94@ MSG_A1_SEC "\ 95 Section to examine or modify. By default, this argument is\n\ 96 interpreted as the name of the desired section. The section\n\ 97 index of the first section with the specified name is used.\n\ 98 \n\ 99 If -shndx is set, then sec is a section index, and is\n\ 100 interpreted as an integer, or one of the well known SHN_\n\ 101 symbolic constant names.\n\ 102 \n\ 103 If -shtyp is set, then sec is a section type, and is\n\ 104 interpreted as an integer, or one of the well known SHT_\n\ 105 symbolic constant names. The section index of the first\n\ 106 section with the specified type is used.\n" 107 108@ MSG_A2_DESC_SH_ADDR "Integer value to set for section address.\n" 109 110@ MSG_A2_DESC_SH_ADDRALIGN "\ 111 Integer value to set for section alignment.\n" 112 113@ MSG_A2_DESC_SH_ENTSIZE "\ 114 Integer value to set for size of an individual element in\n\ 115 a section of fixed-size entries.\n" 116 117@ MSG_A2_DESC_SH_FLAGS "\ 118 Section flags. SHF_ flag constants are accepted, as is\n\ 119 any integer.\n" 120 121@ MSG_A2_DESC_SH_INFO "\ 122 Integer value to set for symbol sh_info field. The meaning\n\ 123 of this value depends on the type of the section.\n" 124 125@ MSG_A2_DESC_SH_LINK "\ 126 Integer value to set for symbol sh_link field. The meaning\n\ 127 of this value depends on the type of the section.\n" 128 129@ MSG_A2_DESC_SH_NAME "\ 130 Name to set for section. If the -name_offset option is\n\ 131 used, this is an integer offset into the section header\n\ 132 string table. Otherwise, it is a string, which will be\n\ 133 looked up in the symbol table in order to obtain the needed\n\ 134 offset value.\n" 135 136@ MSG_A2_DESC_SH_OFFSET "\ 137 Integer value to set for symbol sh_offset field. The value\n\ 138 of sh_offset gives the byte offset from the beginning of\n\ 139 the file to the first byte in the section. For SHT_NOBITS\n\ 140 sections, this member indicates the conceptual offset in the\n\ 141 file, as the section occupies no space in the file.\n" 142 143@ MSG_A2_DESC_SH_SIZE "\ 144 Integer value to set for size of section, in bytes. Unless the\n\ 145 section type is SHT_NOBITS, the section occupies sh_size bytes\n\ 146 in the file. A section of type SHT_NOBITS can have a nonzero\n\ 147 size, but the section occupies no space in the file.\n" 148 149@ MSG_A2_DESC_SH_TYPE "\ 150 Value to set for section type. The value can be an integer,\n\ 151 or one of the well known SHT_ symbolic constant names.\n" 152 153 154 155# Help strings 156 157@ MSG_HELP_DUMP " \ 158 The shdr:dump command is used to display section header\n\ 159 information using the same style used by the elfdump program.\n\ 160 \n\ 161 If shdr:dump is called without arguments, information for every\n\ 162 section header in the object is shown. If called with the shndx\n\ 163 argument, the section header at that index is displayed.\n" 164 165@ MSG_HELP_SH_ADDR " \ 166 The shdr:sh_addr command is used to display or alter the\n\ 167 starting virtual memory address of the section.\n\ 168 \n\ 169 If the section appears in the memory image of a process,\n\ 170 this member gives the address at which the sections's\n\ 171 first byte should reside. Otherwise, the member is expected\n\ 172 to contain the value zero.\n\ 173 \n\ 174 If shdr:sh_addr is called without arguments, the value of\n\ 175 sh_addr for every section in the section header array is\n\ 176 shown. If called with the shndx argument, the value of the\n\ 177 section at that index is displayed. If both arguments are\n\ 178 present, the sh_addr field of the section at the specified\n\ 179 index is set to the given value.\n" 180 181@ MSG_HELP_SH_ADDRALIGN " \ 182 The shdr:sh_addralign command is used to display or alter the\n\ 183 alignment constraint for the section.\n\ 184 \n\ 185 Some sections have address alignment constraints. For example,\n\ 186 if a section holds a double-word, the system must ensure\n\ 187 double-word alignment for the entire section. In this case,\n\ 188 the value of sh_addr must be congruent to 0, modulo the value\n\ 189 of sh_addralign. Currently, only 0 and positive integral\n\ 190 powers of 2 are used in Solaris ELF files. Values 0 and 1\n\ 191 mean the section has no alignment constraints.\n\ 192 \n\ 193 If shdr:sh_addralign is called without arguments, the value\n\ 194 of sh_addralign for every section in the section header array\n\ 195 is shown. If called with the shndx argument, the value of the\n\ 196 section at that index is displayed. If both arguments are\n\ 197 present, the sh_addralign field of the section at the specified\n\ 198 index is set to the given value.\n" 199 200@ MSG_HELP_SH_ENTSIZE " \ 201 The shdr:sh_entsize command is used to display or alter the\n\ 202 per-item entry size for the section.\n\ 203 \n\ 204 Some sections hold a table of fixed-size entries, such as a\n\ 205 symbol table. For such a section, this member gives the size\n\ 206 in bytes of each entry. By convention, the member is set to\n\ 207 the value zero if the section does not hold a table of\n\ 208 fixed-size entries.\n\ 209 \n\ 210 If shdr:sh_entsize is called without arguments, the value\n\ 211 of sh_entsize for every section in the section header array\n\ 212 is shown. If called with the shndx argument, the value of the\n\ 213 section at that index is displayed. If both arguments are\n\ 214 present, the sh_entsize field of the section at the specified\n\ 215 index is set to the given value.\n" 216 217@ MSG_HELP_SH_FLAGS " \ 218 The shdr:sh_flags command is used to display or alter the\n\ 219 flags that are associated with the section.\n\ 220 \n\ 221 \n\ 222 If shdr:sh_flags is called without arguments, the value\n\ 223 of sh_flags for every section in the section header array\n\ 224 is shown. If called with the shndx argument, the value of\n\ 225 the section at that index is displayed. If one or more\n\ 226 value arguments are present, the following steps are taken:\n\ 227 \n \ 228 o\tAll the value arguments are OR'd together.\n\ 229 \n \ 230 o\tIf the -cmp option has been specified, the new value\n\ 231 \tis complemented.\n\ 232 \n \ 233 o\tThe sh_flags field of the section header is updated with\n\ 234 \tthe new value. If -and is specified, the new value is\n\ 235 \tAND'd against the existing value. If -or is specified,\n\ 236 \tthe new value is OR'd against the existing value. If\n\ 237 \tneither -and or -or are specified, the new value replaces\n\ 238 \tthe existing value.\n" 239 240@ MSG_HELP_SH_INFO " \ 241 The shdr:sh_info command is used to display or alter the\n\ 242 sh_info field of the specified section.\n\ 243 \n\ 244 sh_info contains extra information, the interpretation\n\ 245 of which depends on the section type.\n\ 246 \n\ 247 If shdr:sh_info is called without arguments, the value\n\ 248 of sh_info for every section in the section header array\n\ 249 is shown. If called with the shndx argument, the value of the\n\ 250 section at that index is displayed. If both arguments are\n\ 251 present, the sh_info field of the section at the specified\n\ 252 index is set to the given value.\n" 253 254@ MSG_HELP_SH_LINK " \ 255 The shdr:sh_link command is used to display or alter the\n\ 256 sh_link field of the specified section.\n\ 257 \n\ 258 sh_link contains extra information, the interpretation\n\ 259 of which depends on the section type.\n\ 260 \n\ 261 If shdr:sh_link is called without arguments, the value\n\ 262 of sh_link for every section in the section header array\n\ 263 is shown. If called with the shndx argument, the value of the\n\ 264 section at that index is displayed. If both arguments are\n\ 265 present, the sh_link field of the section at the specified\n\ 266 index is set to the given value.\n" 267 268@ MSG_HELP_SH_NAME " \ 269 The shdr:sh_name command is used to display or alter the\n\ 270 name associated with a specified section.\n\ 271 \n\ 272 The sh_name field of a section header is an index into\n\ 273 the section header string table section giving the location\n\ 274 of a null terminated string.\n\ 275 \n\ 276 If shdr:sh_name is called without arguments, the name of\n\ 277 every section in the section header array is shown. If called\n\ 278 with the shndx argument, the name of the section at that\n\ 279 index is displayed. If both arguments are present, the\n\ 280 sh_name field of the section at the specified index is set\n\ 281 to the given value.\n\ 282 \n\ 283 When changing the name of a section, you should be aware\n\ 284 that the name selected must exist within the section header\n\ 285 string table, as it is not possible to add new strings to\n\ 286 this string table.\n" 287 288@ MSG_HELP_SH_OFFSET " \ 289 The shdr:sh_offset command is used to display or alter the\n\ 290 sh_offset field of the specified section.\n\ 291 \n\ 292 sh_offset provides the byte offset from the beginning of\n\ 293 the file to the first byte in the section. For a SHT_NOBITS\n\ 294 section, this member indicates the conceptual offset in\n\ 295 the file, as the section occupies no space in the file.\n\ 296 \n\ 297 If shdr:sh_offset is called without arguments, the value\n\ 298 of sh_offset for every section in the section header array\n\ 299 is shown. If called with the shndx argument, the value of the\n\ 300 section at that index is displayed. If both arguments are\n\ 301 present, the sh_offset field of the section at the specified\n\ 302 index is set to the given value.\n" 303 304@ MSG_HELP_SH_SIZE " \ 305 The shdr:sh_size command is used to display or alter the\n\ 306 sh_size field of the specified section.\n\ 307 \n\ 308 sh_size provides the section's size in bytes. Unless the\n\ 309 section type is SHT_NOBITS, the section occupies sh_size\n\ 310 bytes in the file. A section of type SHT_NOBITS can have\n\ 311 a non-zero size, but the section occupies no space in the file.\n\ 312 \n\ 313 If shdr:sh_size is called without arguments, the value\n\ 314 of sh_size for every section in the section header array\n\ 315 is shown. If called with the shndx argument, the value of the\n\ 316 section at that index is displayed. If both arguments are\n\ 317 present, the sh_size field of the section at the specified\n\ 318 index is set to the given value.\n" 319 320@ MSG_HELP_SH_TYPE " \ 321 The shdr:sh_type command is used to display or alter the\n\ 322 sh_type field of the specified section.\n\ 323 \n\ 324 The type of a section categorizes the section's contents\n\ 325 and semantics.\n\ 326 \n\ 327 If shdr:sh_type is called without arguments, the value\n\ 328 of sh_type for every section in the section header array\n\ 329 is shown. If called with the shndx argument, the value of the\n\ 330 section at that index is displayed. If both arguments are\n\ 331 present, the sh_type field of the section at the specified\n\ 332 index is set to the given value.\n" 333 334 335 336@ _END_ 337 338 339# The following strings represent reserved words, files, pathnames and symbols. 340# Reference to this strings is via the MSG_ORIG() macro, and thus no message 341# translation is required. 342 343 344# Miscellaneous clutter 345@ MSG_STR_EMPTY "" 346@ MSG_STR_NL "\n" 347@ MSG_STR_MINUS_SHNDX "-shndx" 348@ MSG_STR_MINUS_SHTYP "-shtyp" 349@ MSG_STR_MINUS_NAME_OFFSET "-name_offset" 350@ MSG_STR_NAME "name" 351@ MSG_STR_SEC "sec" 352@ MSG_STR_VALUE "value" 353 354 355# Format strings 356 357@ MSG_FMT_WORDVALNL "%u\n" 358@ MSG_FMT_WORDHEXNL "%#x\n" 359@ MSG_FMT_XWORDHEXNL "%#llx\n" 360@ MSG_FMT_STRNL "%s\n" 361 362 363# Module name 364 365@ MSG_MOD_NAME "shdr" 366 367 368# Command names 369 370@ MSG_CMD_DUMP "dump" 371 372@ MSG_CMD_SH_ADDR "sh_addr" 373@ MSG_CMD_SH_ADDRALIGN "sh_addralign" 374@ MSG_CMD_SH_ENTSIZE "sh_entsize" 375@ MSG_CMD_SH_FLAGS "sh_flags" 376@ MSG_CMD_SH_INFO "sh_info" 377@ MSG_CMD_SH_LINK "sh_link" 378@ MSG_CMD_SH_NAME "sh_name" 379@ MSG_CMD_SH_OFFSET "sh_offset" 380@ MSG_CMD_SH_SIZE "sh_size" 381@ MSG_CMD_SH_TYPE "sh_type" 382