Lines Matching defs:data
1 /* Return the next data element from the section after possibly converting it.
136 /* Convert the data in the current section. */
139 int data, size_t size, Elf_Type type)
143 /* Do we need to convert the data and/or adjust for alignment? */
144 if (data == MY_ELFDATA || type == ELF_T_BYTE)
147 /* No need to copy, we can use the raw data. */
174 function to directly access the data elements. */
200 scn->data_list.data.d.d_buf = scn->data_base;
201 scn->data_list.data.d.d_size = size;
202 scn->data_list.data.d.d_type = type;
203 scn->data_list.data.d.d_off = scn->rawdata.d.d_off;
204 scn->data_list.data.d.d_align = scn->rawdata.d.d_align;
205 scn->data_list.data.d.d_version = scn->rawdata.d.d_version;
207 scn->data_list.data.s = scn;
211 /* Store the information for the raw data in the `rawdata' element. */
254 /* If the section has no data (for whatever reason), leave the `d_buf'
261 /* Compressed data has a header, but then compressed data.
301 /* We can use the mapped or loaded data if available. */
331 /* We have to read the data from the file. Allocate the needed
344 /* Cannot read the data. */
353 /* The file descriptor is already closed, we cannot get the data
362 /* Compressed data always has type ELF_T_CHDR regardless of the
383 actual offset of the data in the file. Given that there is always
414 /* We actually read data from the file. At least we tried. */
467 scn->data_list.data.d = scn->rawdata.d;
468 scn->data_list.data.s = scn;
476 __elf_getdata_rdlock (Elf_Scn *scn, Elf_Data *data)
494 /* If `data' is not NULL this means we are not addressing the initial
495 data in the file. But this also means this data is already read
496 (since otherwise it is not possible to have a valid `data' pointer)
497 and all the data structures are initialized as well. In this case
498 we can simply walk the list of data records. */
499 if (data != NULL)
504 returned. But this also means that there must be a first data
507 /* The section the reference data is for must match the section
509 || unlikely (((Elf_Data_Scn *) data)->s != scn))
520 /* If `data' does not match any known record punt. */
527 if (&runp->data.d == data)
534 /* Return the data for the next data record. */
535 result = runp->next ? &runp->next->data.d : NULL;
539 /* If the data for this section was not yet initialized do it now. */
544 lock. But this means that the data could meanwhile be
550 /* Read the data from the file. There is always a file (or
558 /* At this point we know the raw data is available. But it might be
560 Now create the converted data in case this is necessary. */
564 /* Return the first data element in the list. */
565 result = &scn->data_list.data.d;
572 elf_getdata (Elf_Scn *scn, Elf_Data *data)
580 result = __elf_getdata_rdlock (scn, data);