Lines Matching refs:sd
184 // Read the section data into SD. This is code common to Sized_relobj_file
190 Read_symbols_data* sd)
197 sd->section_headers = this->get_lasting_view(shoff, shnum * shdr_size,
201 const unsigned char* pshdrs = sd->section_headers->data();
209 sd->section_names_size =
211 sd->section_names = this->get_lasting_view(shdrnames.get_sh_offset(),
212 sd->section_names_size, false,
276 Relobj::copy_symbols_data(Symbols_data* gc_sd, Read_symbols_data* sd,
281 memcpy(gc_sd->section_headers_data, sd->section_headers->data(),
284 new unsigned char[sd->section_names_size];
285 memcpy(gc_sd->section_names_data, sd->section_names->data(),
286 sd->section_names_size);
287 gc_sd->section_names_size = sd->section_names_size;
288 if (sd->symbols != NULL)
291 new unsigned char[sd->symbols_size];
292 memcpy(gc_sd->symbols_data, sd->symbols->data(),
293 sd->symbols_size);
299 gc_sd->symbols_size = sd->symbols_size;
300 gc_sd->external_symbols_offset = sd->external_symbols_offset;
301 if (sd->symbol_names != NULL)
304 new unsigned char[sd->symbol_names_size];
305 memcpy(gc_sd->symbol_names_data, sd->symbol_names->data(),
306 sd->symbol_names_size);
312 gc_sd->symbol_names_size = sd->symbol_names_size;
734 Read_symbols_data* sd)
736 const unsigned char* const pshdrs = sd->section_headers->data();
737 const unsigned char* namesu = sd->section_names->data();
740 if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
743 if (memmem(names, sd->section_names_size, ".zdebug_", 8) != NULL)
747 pshdrs, this->shnum(), names, sd->section_names_size, this, true);
755 && (memmem(names, sd->section_names_size, "debug_info", 12) == 0
756 || memmem(names, sd->section_names_size, "debug_types",
764 Sized_relobj_file<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
766 this->base_read_symbols(sd);
774 Sized_relobj_file<size, big_endian>::base_read_symbols(Read_symbols_data* sd)
776 this->read_section_data(&this->elf_file_, sd);
778 const unsigned char* const pshdrs = sd->section_headers->data();
782 bool need_local_symbols = this->do_find_special_sections(sd);
784 sd->symbols = NULL;
785 sd->symbols_size = 0;
786 sd->external_symbols_offset = 0;
787 sd->symbol_names = NULL;
788 sd->symbol_names_size = 0;
851 sd->symbols = fvsymtab;
852 sd->symbols_size = readsize;
853 sd->external_symbols_offset = need_local_symbols ? locsize : 0;
854 sd->symbol_names = fvstrtab;
855 sd->symbol_names_size =
1281 Read_symbols_data* sd)
1298 should happen. In the first pass, the data in sd is saved to be used
1305 gold_assert(sd != NULL);
1326 this->copy_symbols_data(gc_sd, sd, This::shdr_size * shnum);
1348 section_headers_data = sd->section_headers->data();
1349 section_names_size = sd->section_names_size;
1350 if (sd->symbols != NULL)
1351 symbols_data = sd->symbols->data();
1352 symbols_size = sd->symbols_size;
1353 if (sd->symbol_names != NULL)
1354 symbol_names_data = sd->symbol_names->data();
1355 symbol_names_size = sd->symbol_names_size;
1365 : sd->section_names->data());
1427 delete sd->section_headers;
1428 sd->section_headers = NULL;
1429 delete sd->section_names;
1430 sd->section_names = NULL;
1838 delete sd->section_headers;
1839 sd->section_headers = NULL;
1840 delete sd->section_names;
1841 sd->section_names = NULL;
1875 Read_symbols_data sd;
1876 this->base_read_symbols(&sd);
1878 sd.symbols->data(),
1879 sd.symbols_size,
1880 sd.symbol_names->data(),
1881 sd.symbol_names_size,
1937 Read_symbols_data* sd,
1940 if (sd->symbols == NULL)
1942 gold_assert(sd->symbol_names == NULL);
1947 size_t symcount = ((sd->symbols_size - sd->external_symbols_offset)
1949 if (symcount * sym_size != sd->symbols_size - sd->external_symbols_offset)
1958 reinterpret_cast<const char*>(sd->symbol_names->data());
1960 sd->symbols->data() + sd->external_symbols_offset,
1962 sym_names, sd->symbol_names_size,
1966 delete sd->symbols;
1967 sd->symbols = NULL;
1968 delete sd->symbol_names;
1969 sd->symbol_names = NULL;
1982 Read_symbols_data* sd,
1988 reinterpret_cast<const char*>(sd->symbol_names->data());
1990 sd->symbols->data() + sd->external_symbols_offset;
1992 size_t symcount = ((sd->symbols_size - sd->external_symbols_offset)
2030 Read_symbols_data* sd,
2034 reinterpret_cast<const char*>(sd->symbol_names->data());
2036 sd->symbols->data() + sd->external_symbols_offset;
2038 size_t symcount = ((sd->symbols_size - sd->external_symbols_offset)
2505 Symbols_data* sd = this->get_symbols_data();
2506 if (sd != NULL)
2508 const unsigned char* pshdrs = sd->section_headers_data
2513 // If sd is NULL, read the section header from the file.
2524 Symbols_data* sd = this->get_symbols_data();
2525 gold_assert(sd != NULL);
2527 const unsigned char* pshdrs = sd->section_headers_data