Lines Matching defs:to

18    along with this program; if not, write to the Free Software
32 to be written. The code is changing quickly enough that we
61 need to move into elfcode.h. */
194 cause invalid hash tables to be generated. */
219 cause invalid hash tables to be generated. */
234 the object_id field of an elf_obj_tdata field set to OBJECT_ID. */
293 /* No cached one, attempt to read, and cache what we read. */
297 /* Allocate and clear an extra byte at the end, to prevent crashes
309 /* Once we've failed to read it, make sure we don't keep
342 _bfd_error_handler (_("%B: attempt to load strings from a non-string section (number %d)"),
367 /* Read and convert symbols to internal format.
368 SYMCOUNT specifies the number of symbols to read, starting from
370 are non-NULL, they are used to store the internal symbols, external
372 Returns a pointer to the internal symbol buffer (malloced if necessary)
410 /* Find an index section that is linked to this symtab section. */
427 /* Not really accurate, but this was how the old code used to work. */
485 /* Convert the symbols to internal form. */
525 /* Check for a bogus st_shndx to avoid crashing. */
561 /* First we need to ensure the symbol table is available. Make sure
587 is set to -1 if there are no SHT_GROUP sections. */
638 /* Add to list of sections. */
670 corrupt, do not allow any of the contents to be used. */
677 to the flag word followed by an array of elf section
736 /* Look through this group's sections to see if current
744 other members to see if any others are linked via
773 /* If the group section has been created, point to the
833 sh_link. We don't want to proceed. */
942 /* Make a BFD section from an ELF section. We store a pointer to the
1012 /* The debugging sections appear to be recognized only by name,
1038 only link a single copy of the section. This is used to support
1041 are permitted. The GNU linker extension is to actually discard
1076 one PT_LOAD header, then leave the section lma equal to vma
1099 /* We used to use the same adjustment for SEC_LOAD
1142 /* Compress the uncompressed section or convert from/to .zdebug*
1164 (_("%B: unable to initialize compress status for section %s"),
1175 (_("%B: unable to initialize decompress status for section %s"),
1188 /* Convert section name from .zdebug_* to .debug_* so
1199 section rename to elf_fake_sections. */
1216 be against the same symbol. In such a case, we don't want to
1267 to be the correct section. */
1297 /* PR 19938: Attempt to set the ELF section header fields of an OS or
1316 When a section's type is changed to NOBITS, we preserve
1321 The sh_link and sh_info fields should point to the
1324 the whole point of this action is to preserve the
1338 /* Allow the target a chance to decide how these fields should be set. */
1345 sh_info and/or sh_link fields. Attempt to follow those links and find
1346 the section in the output bfd which corresponds to the linked section
1371 (_("%B: Failed to find link section for section %d"), obfd, secnum);
1398 (_("%B: Failed to find info section for section %d"), obfd, secnum);
1404 /* Copy the program header and other data from one object module to
1478 /* We have found a connection from the input section to the
1479 output section. Attempt to copy the header fields. If
1481 should only be a one-to-one mapping between input and output. */
1491 /* That failed. So try to deduce the corresponding input section.
1961 sections, with each the string indicies pointing to the next in the
1962 loop. Detect this here, by refusing to load a section that we are
1965 can expect to recurse at least once.
1967 FIXME: It would be better if this array was attached to the bfd,
1974 /* FIXME: It would be more efficient to attach this array to the bfd somehow. */
2021 field set to SHN_BEFORE or SHN_AFTER. */
2077 /* Some assemblers erroneously set sh_info to one with a
2144 /* else FIXME: we have failed to find the symbol table - should we issue an error ? */
2160 /* Some linkers erroneously set sh_info to one with a
2239 regular section. We need to scan all the headers to be sure,
2280 /* Check for a bogus link to avoid crashing. */
2295 reject them, but, unfortunately, some people need to use
2297 one suitable symbol table, we clobber the sh_link to point
2298 to it. I hope this doesn't break anything.
2336 can't use it as a reloc section if it points to the null
2338 sh_link points to the null section. */
2377 /* In the section to which the relocations apply, mark whether
2431 /* We try to keep the same section order as it comes in. */
2467 /* FIXME: How to properly handle allocated section reserved
2471 (_("%B: don't know how to handle allocated, application "
2487 (_("%B: don't know how to handle processor specific section "
2495 required to correctly process the section and the file should
2499 (_("%B: don't know how to handle OS specific section "
2513 (_("%B: don't know how to handle section `%s' [0x%8x]"),
2591 unless you have to cope with broken compilers that don't emit section
2592 attributes or you want to help the user writing assembler. */
2831 /* When we read a file, we don't need to set ELF section type and
2838 sections. We don't want _bfd_elf_init_private_section_data to
2954 not have their contents written to a core file, on the
2957 section size to zero. Note that "real" bss sections will
2958 always have their contents dumped to the core file. */
3141 /* Set SEC_ELF_COMPRESS to indicate this section should be
3146 name to section name section after it is compressed in
3157 convert section name from .zdebug_* to .debug_* if
3242 /* Warn if we are changing a NOBITS section to PROGBITS, but
3243 allow the link to proceed. This can happen when users link
3244 non-bss input sections to bss output sections, or emit data
3245 to a bss output section via a linker script. */
3247 (_("warning: section `%A' type changed to PROGBITS"), asect);
3364 this section, it is up to the processor-specific back-end to
3453 /* The ELF backend linker sets sh_info to -2 when the group
3462 /* The point of this little dance to the first SHF_GROUP section
3463 then back to the SHT_GROUP section is that this gets us to
3491 /* Arrange for the section to be written out. */
3502 /* Get the pointer to the first section in the group that gas
3503 squirreled away here. objcopy arranges for this to be set to the
3509 just to keep the group in the same order as given in .section
3537 /* Return the section which RELOC_SEC applies to. */
3553 /* We look up the section the relocs apply to by name. */
3561 section apply to .got.plt section. */
3567 to some other output section. Try two likely sections. */
3744 table. sh_info is the section index of the section to which
3759 /* We need to set up sh_link for SHF_LINK_ORDER. */
3765 /* elf_linked_to_section points to the input section. */
3774 (_("%B: sh_link of section `%A' points to discarded section `%A' of `%B'"),
3777 /* Point to the kept section if it has the same
3798 (_("%B: sh_link of section `%A' points to removed section `%A' of `%B'"),
3830 table. sh_info is the section index of the section to
3850 field to point to this section. */
3914 /* Delay setting sh_name to _bfd_elf_write_object_contents so that
3916 debug section name from .debug_* to .zdebug_* if needed. */
3934 /* Filter global symbols of ABFD to include in the import library. All
3936 SYMS. Pointers of symbols to keep should be stored contiguously at
3939 Returns the number of symbols to keep. */
3972 /* Don't output section symbols for sections that are not going to be
3993 /* Map symbol from it's internal number to the external number, moving
3994 all local symbols to be at the head of the list. */
4030 decided to output. */
4117 /* Align to the maximum file alignment that could be required for any
4126 /* Assign a file position to a section, optionally aligning to the
4144 /* Compute the file positions we are going to put the sections at, and
4145 otherwise prepare to begin writing out the ELF file. If LINK_INFO
4309 /* Try to create just one PT_NOTE segment
4313 each note is padded to a multiple of 4 size,
4372 /* Create a mapping from a set of sections to a program segment. */
4378 unsigned int to,
4387 amt += (to - from - 1) * sizeof (asection *);
4393 for (i = from, hdrpp = sections + from; i < to; i++, hdrpp++)
4395 m->count = to - from;
4478 /* Set up a mapping from BFD sections to program segments. */
4522 left operator when shift count is equal to size of type
4601 is not adjacent to the program headers. This is an
4620 If we have had to create our own PT_PHDR segment, but it is
4621 not going to be covered by the first PT_LOAD segment, then
4661 /* In the next test we have to be careful when last_hdr->lma is close
4662 to the end of the address space. If the aligned address wraps
4663 around to the start of the address space, then there are no more
4664 pages left in memory and it is OK to assume that the current
4671 /* If putting this section in this segment would force us to
4681 /* We don't want to put a loaded section after a
4683 as that will force the non-loaded section to be loaded.
4693 don't require the sections to be correctly aligned in the
4702 /* We don't want to put a writable section in a read only
4717 /* Allow interested parties a chance to override our decision. */
4991 /* Sort by LMA first, since this is the address used to
5014 here, but continue to try the next comparison. */
5026 /* Sort by size, to put zero sized sections
5043 not good. We have to make sure either that the number is not
5049 What we're trying to say here is something like ``increase OFF by
5050 the least amount that will cause it to be equal to the VMA modulo
5116 /* Assign file positions to the sections based on the mapping from
5117 sections to segments. This function also sets up some fields in
5180 where the layout is forced to according to a larger size in the
5214 not be done to the PT_NOTE section of a corefile, which may
5224 number of sections with contents contributing to both p_filesz
5226 that just contribute to p_memsz. In this loop, OFF tracks next
5322 /* We shouldn't need to align the segment on disk since
5325 checks it. So to comply with the alignment
5346 /* Set the note section type to SHT_NOTE. */
5455 (_("%B: section %A lma %#lx adjusted to %#lx"), abfd, sec,
5513 final PT_LOAD".) Set sh_offset to the value it
5537 /* .tbss is special. It doesn't contribute to p_memsz of
5645 /* We don't need to page align empty sections. */
5707 A program can use this to examine itself robustly. */
5776 library, but we need to use the same linker logic. */
5799 It is better for objcopy/strip to honor these attributes
5891 "side-channel" data attached to a section to which they apply, and
5952 assignment of sections to segments. */
5966 /* Set e_type in ELF header to ET_EXEC for -pie -Ttext-segment=. */
5979 /* Set e_type to ET_EXEC if the lowest p_vaddr in PT_LOAD
5995 message. Plus the PHDR segment does not have to be the first segment
5999 FIXME: We used to have code here to sort the PT_LOAD segments into
6011 /* The fix for this error is usually to edit the linker script being
6068 /* There used to be a long list of cases here, each one setting
6069 e_machine to the same EM_* macro #defined as ELF_MACHINE_CODE
6075 e_machine with the conditions used to determine it. */
6157 section name from .debug_* to .zdebug_*. */
6164 /* Add section name to section name section. */
6172 /* Add reloc section name to section name section. */
6237 /* After writing the headers, we need to write the sections too... */
6283 /* Given a section, search the header to find them. */
6445 /* The complicated case when p_vaddr is 0 is to handle the Solaris
6447 p_memsz set to 0. */
6466 4. The section has not already been allocated to a previous segment.
6505 It is possible to have overlapping VMA ranges without overlapping LMA
6507 to the same VMA range, but with the .data section mapped to a different
6520 p_paddr fields are zero. When we try to objcopy or strip such a
6536 parameters to objcopy. Also, fix some solaris weirdness. */
6548 /* Mininal change so that the normal section to segment
6574 /* Extend SEGMENT2 to include SEGMENT and then delete
6594 /* Extend SEGMENT to include SEGMENT2 and then delete
6610 /* The second scan attempts to assign sections to segments. */
6647 /* Allocate a segment map big enough to contain
6655 /* Initialise the fields of the segment map. Default to
6663 no need to preserve segment physical address in the corresponding
6708 to add their corresponding output sections to the segment map.
6709 The problem here is how to handle an output section which has
6713 In this case we can continue to use the segment LMA from the
6717 In this case we can change the segment's LMA to match the LMA
6722 placed in the current segment which will have to have its size,
6724 have to be created to contain the other sections.
6727 In this case we can change the segment's LMA to match the LMA
6728 of the first section and we will have to create a new segment
6729 or segments to contain the other sections.
6731 In order to save time, we allocate an array to hold the section
6733 to a segment, they are removed from this array. */
6740 Also add the sections to the section array allocated above.
6741 Also add the sections to the current segment. In the common
6744 more to do. */
6761 /* The Solaris native linker always sets p_paddr to 0.
6762 We try to catch that case here, and set it to the
6816 specified. This is the default case. Add the segment to
6817 the list of built segments and carry on to process the next
6841 Keep it, but modify its physical address to match the
6848 Change the current segment's physical address to match
6854 to allow for space taken up by elf headers. */
6875 to hold these headers, so that we can adjust the
6886 those that fit to the current segment and removing them from the
6887 sections array; but making sure not to leave large gaps. Once all
6888 possible sections have been assigned to the current segment it is
6889 added to the list of built segments and if sections still remain
6890 to be assigned, a new segment is constructed before repeating
6935 maxpagesize then we need to start a new segment. */
6966 /* Add the current segment to the list of built segments. */
6972 /* We still have not allocated all of the sections to
6985 physical address to the LMA of the first section that has
7004 /* If we had to estimate the number of program headers that were
7005 going to be needed, then check our estimate now and adjust
7091 /* Allocate a segment map big enough to contain
7183 /* We need to keep the space used by the headers fixed. */
7217 /* Check to see if any sections in the input BFD
7227 /* Regenerate the segment map if p_paddr is set to 0. */
7242 and p_memsz fields of special segments (DYNAMIC, INTERP) to 0
7264 removed. What else do we need to check? */
7277 /* Check to see if any output section do not come from the
7294 /* When rewriting program header, set the output maxpagesize to
7346 set to something different. For a final link allow some flags
7347 that the linker clears to differ. */
7361 to the input group members. Ignore linker created group section.
7382 /* We need to handle elf_linked_to_section for SHF_LINK_ORDER. We
7383 don't use the output section of the linked-to section since it
7470 /* If we've been called for ld -r, then we need to
7514 which we did not map into a BFD section, try to map the section
7608 /* Allocate buffer to swap out the .strtab section. */
7693 to get the final offset for st_name. */
7776 knew what to expect of the library, and what to
7779 section of a symbol to be a section that is
7788 Unable to find equivalent output section for symbol '%s' from section '%s'"),
7924 /* Return the number of bytes required to hold the symtab vector.
8022 or SHT_RELA, and uses the dynamic symbol table, is considered to be a
8054 dynamic symbol table, is considered to be a dynamic reloc section. */
8270 index. Therefore we have to run through all entries and find
8482 underscore to be emitted on some ELF targets). For ease of use,
8496 so we only need to match the rest. */
8554 /* Find the nearest line to a particular section and offset,
8616 /* After a call to bfd_find_nearest_line, successive calls to
8617 bfd_find_inliner_info can be used to get source information about
8619 passed to bfd_find_nearest_line. Currently this is only supported
8684 /* We must compress this section. Write output to the buffer. */
8709 /* Try to convert a non-ELF reloc into an ELF one. */
8721 /* Alien reloc: Try to determine its type to replace it with an
8822 range-checking to interfere. There is nothing else to do in processing
8838 machine-dependent procfs structure in order to pick
8864 reference to NAME, so you shouldn't deallocate or
8886 actually creates up to two pseudosections:
8996 /* Fail - we don't know how to handle any other
9018 but it doesn't matter, because we don't have to pick this
9233 /* Fail - we don't know how to handle any other
9395 /* FIXME: need to add ->core->command. */
9492 case NT_FPREGSET: /* FIXME: rename to NT_PRFPREG */
9933 /* NetBSD-specific core "procinfo". Note that we expect to
10145 tid from the previous call to pass down to the next gregs
10193 buffer to hold note, and current size of buffer
10199 Writes note to end of buffer. ELF64 notes are written exactly as
10201 that they ought to have 8-byte namesz and descsz field, and have
10205 Pointer to realloc'd buffer, *BUFSIZ updated. */
10877 /* Providing external access to the ELF program header table. */
10879 /* Return an upper bound on the number of bytes required to store a
10895 /* Copy ABFD's program header table entries to *PHDRS. The entries
10898 buffer needs to be, call bfd_get_elf_phdr_upper_bound.
10957 other SEC_MERGE section. In this case, we need to leave
10986 the new offset within the section, based upon changes made to the
11013 to bytes before subtracting the original offset. */
11024 points to. If not null, *LOADBASEP is filled in with the difference
11028 The function TARGET_READ_MEMORY is called to copy LEN bytes from the
11165 ??? This repeats *COM* id of zero. sec->id is supposed to be unique,
11166 but current usage would allow all of _bfd_std_section to be zero. t*/
11182 osabi field to ELFOSABI_GNU if the binary contains symbols of
11202 function size and set *CODE_OFF to the function's entry point,