Lines Matching defs:symbol

130 /* This fully describes the symbol types which may be attached to
152 /* Assorted symbol information that needs to be derived from the BFD symbol
153 and/or the BFD backend private symbol data. */
168 /* Map SOM section names to POSIX/BSD single-character symbol types.
246 S = symbol index
1216 relocations have a symbol number < 0x100 and have simple encodings
1265 one. Hard relocations occur if the symbol number was too high or if
1288 /* Now output the symbol index and see if this bizarre relocation
1520 /* If there's no SOM symbol type associated with this BFD
1521 symbol, then set the symbol type to ST_DATA.
1527 R_DATA_ONE_SYMBOL reloc involving an ST_CODE symbol.
1733 /* Initialize the saved symbol table and string table to NULL.
2415 We desire symbols to be ordered starting with the symbol with the
2416 highest relocation count down to the symbol with the lowest relocation
2426 /* Get relocation count for each symbol. Note that the count
2473 /* Most SOM relocations involving a symbol have a length which is
2474 dependent on the index of the symbol. So symbols which are
2477 /* First initialize the counters for each symbol. */
2480 /* Handle a section symbol; these have no pointers back to the
2481 SOM symbol info. So we just use the udata field to hold the
2494 of how often a given symbol is used in a relocation. */
2509 /* A relocation against a symbol in the *ABS* section really
2510 does not have a symbol. Likewise if the symbol isn't associated
2518 two relocations have single byte versions if the symbol
2536 /* A normal symbol. Increment the count. */
2541 /* Sort a copy of the symbol table, rather than the canonical
2542 output symbol table. */
2550 /* Compute the symbol indexes, they will be needed by the relocation
2554 /* A section symbol. Again, there is no pointer to backend symbol
2653 /* Get the symbol number. Remember it's stored in a
3051 /* Write out the symbol string table. */
3074 strings within the compilation unit are part of the symbol
3124 field in the symbol table entry. */
3192 symbol table entry. */
3595 /* Next is the symbol table. These are fixed length records.
3598 in the object file for the symbol table.
3601 and the index for each symbol name into the string table is computed
3602 below. Therefore, it is not possible to write the symbol table
3619 /* Next are the symbol strings.
3625 /* Scribble out the symbol strings. */
3658 /* Now that the symbol table information is complete, build and
3659 write the symbol table. */
3912 /* Section symbols will not have a SOM symbol type assigned to
3926 /* It is possible to have a symbol without an associated
3927 type. This happens if the user imported the symbol
3928 without a type and the symbol was never defined
3929 locally. If BSF_FUNCTION is set for this symbol, then
3952 /* For unknown symbols set the symbol's type based on the symbol's
3979 /* Now handle the symbol's scope. Exported data which is not
4002 subspace index of the space this symbol is contained in. */
4006 /* Set the symbol's value. */
4023 An IS_COMDAT data symbol is similar to a IS_COMMON | DUP_COMMON
4024 symbol except in that it loses its IS_COMDAT flag in a shared link.
4034 universal symbol (comdat key sysmbol) in a subspace.
4054 /* Build and write, in one big chunk, the entire symbol table for
4067 /* Compute total symbol table size and allocate a chunk of memory
4068 to hold the symbol table as we build it. */
4075 /* Walk over each symbol. */
4080 /* This is really an index into the symbol strings table.
4082 computed and stored into the name field in the BFD symbol. */
4085 /* Derive SOM information from the BFD symbol. */
4102 scribble out the symbol table. */
4176 /* Return the amount of data (in bytes) required to hold the symbol
4191 bfd_section_from_som_symbol (bfd *abfd, struct symbol_dictionary_record *symbol)
4199 || (symbol->symbol_type != ST_ENTRY
4200 && symbol->symbol_type != ST_PRI_PROG
4201 && symbol->symbol_type != ST_SEC_PROG
4202 && symbol->symbol_type != ST_MILLICODE))
4204 int index = symbol->symbol_info;
4212 unsigned int value = symbol->symbol_value;
4214 /* For executables we will have to use the symbol's address and
4223 /* Could be a symbol from an external library (such as an OMOS
4228 /* Read and save the symbol table associated with the given BFD. */
4303 sym->symbol.the_bfd = abfd;
4304 sym->symbol.name = bufp->name.n_strx + stringtab;
4305 sym->symbol.value = bufp->symbol_value;
4306 sym->symbol.section = 0;
4307 sym->symbol.flags = 0;
4313 sym->symbol.flags |= BSF_FUNCTION;
4315 sym->symbol.value & 0x3;
4316 sym->symbol.value &= ~0x3;
4324 sym->symbol.value & 0x3;
4325 sym->symbol.value &= ~0x3;
4326 /* If the symbol's scope is SS_UNSAT, then these are
4329 sym->symbol.flags |= BSF_FUNCTION;
4339 so the section associated with this symbol can't be known. */
4342 sym->symbol.section = bfd_und_section_ptr;
4344 sym->symbol.section = bfd_com_section_ptr;
4345 sym->symbol.flags |= (BSF_EXPORT | BSF_GLOBAL);
4350 sym->symbol.section = bfd_und_section_ptr;
4352 sym->symbol.section = bfd_com_section_ptr;
4356 sym->symbol.flags |= (BSF_EXPORT | BSF_GLOBAL);
4357 sym->symbol.section = bfd_section_from_som_symbol (abfd, bufp);
4358 sym->symbol.value -= sym->symbol.section->vma;
4362 sym->symbol.flags |= BSF_LOCAL;
4363 sym->symbol.section = bfd_section_from_som_symbol (abfd, bufp);
4364 sym->symbol.value -= sym->symbol.section->vma;
4368 /* Check for a weak symbol. */
4370 sym->symbol.flags |= BSF_WEAK;
4373 Note $START$ is a magic code symbol, NOT a section symbol. */
4374 if (sym->symbol.name[0] == '$'
4375 && sym->symbol.name[strlen (sym->symbol.name) - 1] == '$'
4376 && !strcmp (sym->symbol.name, sym->symbol.section->name))
4377 sym->symbol.flags |= BSF_SECTION_SYM;
4378 else if (!strncmp (sym->symbol.name, "L$0\002", 4))
4380 sym->symbol.flags |= BSF_SECTION_SYM;
4381 sym->symbol.name = sym->symbol.section->name;
4383 else if (!strncmp (sym->symbol.name, "L$0\001", 4))
4384 sym->symbol.flags |= BSF_DEBUGGING;
4391 /* We modify the symbol count to record the number of BFD symbols we
4408 /* Canonicalize a SOM symbol table. Return the number of entries
4409 in the symbol table. */
4424 *location = &symbase->symbol;
4431 /* Make a SOM symbol. There is nothing special to do here. */
4441 new->symbol.the_bfd = abfd;
4443 return &new->symbol;
4446 /* Print symbol information. */
4451 asymbol *symbol,
4459 fprintf (file, "%s", symbol->name);
4463 fprintf_vma (file, symbol->value);
4464 fprintf (file, " %lx", (long) symbol->flags);
4470 section_name = symbol->section ? symbol->section->name : "(*none*)";
4471 bfd_print_symbol_vandf (abfd, (void *) file, symbol);
4472 fprintf (file, " %s\t%s", section_name, symbol->name);
4655 /* A symbol to use in the relocation. Make a note
4974 /* Copy any private info we understand from the input symbol
4975 to the output symbol. */
5162 /* Set the full SOM symbol type. SOM needs far more symbol information
5164 to be able to know if a symbol is an entry point, millicode, data,
5166 the symbol type wrong your program will not link. */
5169 bfd_som_set_symbol_type (asymbol *symbol, unsigned int type)
5171 som_symbol_data (symbol)->som_type = type;
5337 /* Return the single-character symbol type corresponding to
5352 som_decode_symclass (asymbol *symbol)
5356 if (bfd_is_com_section (symbol->section))
5358 if (bfd_is_und_section (symbol->section))
5360 if (symbol->flags & BSF_WEAK)
5364 if (symbol->flags & BSF_OBJECT)
5372 if (bfd_is_ind_section (symbol->section))
5374 if (symbol->flags & BSF_WEAK)
5378 if (symbol->flags & BSF_OBJECT)
5383 if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
5386 if (bfd_is_abs_section (symbol->section)
5387 || (som_symbol_data (symbol) != NULL
5388 && som_symbol_data (symbol)->som_type == SYMBOL_TYPE_ABSOLUTE))
5390 else if (symbol->section)
5391 c = som_section_type (symbol->section->name);
5394 if (symbol->flags & BSF_GLOBAL)
5399 /* Return information about SOM symbol SYMBOL in RET. */
5403 asymbol *symbol,
5406 ret->type = som_decode_symclass (symbol);
5408 ret->value = symbol->value + symbol->section->vma;
5411 ret->name = symbol->name;
5414 /* Count the number of symbols in the archive symbol table. Necessary
5451 /* Seek to the first symbol in this hash chain. */
5455 /* Read in this symbol and update the counter. */
5466 /* Seek to the next symbol. */
5471 /* Read the symbol in and update the counter. */
5538 /* Seek to and read the first symbol on the chain. */
5546 /* Get the name of the symbol, first get the length which is stored
5547 as a 32bit integer just before the symbol.
5574 /* Go to the next symbol. */
5580 /* Seek to the next symbol and read it in. */
5611 /* Go on to the next symbol. */
5616 archive symbol table. */
5653 /* For archives without .o files there is no symbol table. */
5671 /* How big is the archive symbol table entry? */
5683 /* Read in the library symbol table. We'll make heavy use of this
5696 /* Count the number of symbols in the library symbol table. */
5700 /* Get back to the start of the library symbol table. */
5722 /* Notify the generic archive code that we have a symbol map. */
5727 /* Begin preparing to write a SOM library symbol table.
5757 /* Make sure the symbol table has been read, then snag a pointer
5766 /* Examine each symbol to determine if it belongs in the
5767 library symbol table. */
5772 /* Derive SOM information from the BFD symbol. */
5773 som_bfd_derive_misc_symbol_info (curr_bfd, &sym->symbol, &info);
5775 /* Should we include this symbol? */
5787 if (bfd_is_und_section (sym->symbol.section))
5793 *stringsize = *stringsize + strlen (sym->symbol.name) + 5;
5803 /* Hash a symbol name based on the hashing algorithm presented in the
5807 som_bfd_ar_symbol_hash (asymbol *symbol)
5809 unsigned int len = strlen (symbol->name);
5813 return 0x1000100 | (symbol->name[0] << 16) | symbol->name[0];
5815 return ((len & 0x7f) << 24) | (symbol->name[1] << 16)
5816 | (symbol->name[len - 2] << 8) | symbol->name[len - 1];
5820 symbol table. */
5911 /* Make sure the symbol table has been read, then snag a pointer
5924 /* Derive SOM information from the BFD symbol. */
5925 som_bfd_derive_misc_symbol_info (curr_bfd, &sym->symbol, &info);
5927 /* Should we include this symbol? */
5939 if (bfd_is_und_section (sym->symbol.section))
5942 /* If this is the first symbol from this SOM, then update
5950 /* Fill in the lst symbol record. */
5959 curr_lst_sym->is_common = bfd_is_com_section (sym->symbol.section);
5970 curr_lst_sym->symbol_key = som_bfd_ar_symbol_hash (&sym->symbol);
5979 so tack this symbol onto the end of the chain. */
5995 /* Keep track of the last symbol we added to this chain so we can
6001 bfd_put_32 (abfd, strlen (sym->symbol.name), p);
6003 strcpy (p, sym->symbol.name);
6004 p += strlen (sym->symbol.name) + 1;
6011 /* Head to the next symbol. */
6213 /* Free the native string and symbol tables. */
6283 /* Leading_symbol_char: is the first char of a user symbol