Lines Matching defs:to

20    with this program; if not, write to the Free Software Foundation, Inc.,
135 /* Offsets to some stack save slots. */
153 sometimes the .plt entry crosses a 64k boundary and we need to
154 insert an addi to adjust r11. */
223 /* After that, we need two instructions to load the index, followed by
242 with identical R_PPC64_RELATIVE relocs, there is really no need to
243 propagate .opd relocs; The dynamic linker should be taught to
396 /* An absolute 16 bit branch, for which bit 10 should be set to
397 indicate that the branch is expected to be taken. The lower two
413 /* An absolute 16 bit branch, for which bit 10 should be set to
414 indicate that the branch is not expected to be taken. The lower
460 /* A relative 16 bit branch. Bit 10 should be set to indicate that
461 the branch is expected to be taken. The lower two bits must be
477 /* A relative 16 bit branch. Bit 10 should be set to indicate that
478 the branch is not expected to be taken. The lower two bits must
494 /* Like R_PPC64_ADDR16, but referring to the GOT table entry for the
510 /* Like R_PPC64_ADDR16_LO, but referring to the GOT table entry for
526 /* Like R_PPC64_ADDR16_HI, but referring to the GOT table entry for
542 /* Like R_PPC64_ADDR16_HA, but referring to the GOT table entry for
562 run has to have the data at some particular address. */
610 doubleword64 is set to the load address of the object, plus the
671 /* 32-bit relocation to the symbol's procedure linkage table. */
686 /* 32-bit PC relative relocation to the symbol's procedure linkage table.
702 /* Like R_PPC64_ADDR16_LO, but referring to the PLT table entry for
718 /* Like R_PPC64_ADDR16_HI, but referring to the PLT table entry for
734 /* Like R_PPC64_ADDR16_HA, but referring to the PLT table entry for
934 /* 64-bit relocation to the symbol's procedure linkage table. */
949 /* 64-bit PC relative relocation to the symbol's procedure linkage
1054 value to relocate may (!) refer to a PLT entry which the link
1056 is unable to fully resolve the symbol, it may (b) create a PLT
1057 entry and store the address to the new PLT entry in the GOT.
1060 R_PPC64_GLOB_DAT to tie the symbol to the GOT entry. */
1699 /* Allocates two contiguous entries in the GOT to hold a tls_index structure,
1701 to the first entry relative to the TOC base (r2). */
1761 /* Allocates two contiguous entries in the GOT to hold a tls_index structure,
1762 with values (sym+add)@dtpmod and zero, and computes the offset to the
1763 first entry relative to the TOC base (r2). */
1824 the offset to the entry relative to the TOC base (r2). */
1885 offset to the entry relative to the TOC base (r2). */
2184 /* GNU extension to record C++ vtable hierarchy. */
2199 /* GNU extension to record C++ vtable member usage. */
2824 symbol referenced from different input files. This is to support
2826 from one input file to another. After partitioning into TOC groups
2829 Point to the BFD owning this GOT entry. */
2836 /* Non-zero if got.ent points to real entry. */
2866 /* Shortcuts to dynamic linker sections. */
2871 on removed .opd entries to this section so that the sym is removed. */
2887 the reloc to be in the range -32768 to 32767. */
3055 /* Points to the function code section for local opd entries. */
3058 /* After editing .opd, adjust references to opd local syms. */
3075 /* Flag set when small branches are detected. Used to
3317 to this function is the real binary. */
3440 /* Have udata.p point back to the original symbol this
3631 /* Have udata.p point back to the original symbol this
3656 /* FIXME: It would be very much nicer to put sym@plt on the
3665 ppc64 binaries used different stubs to current code.
3666 (b) is the tricky one since you need to known the toc
3667 pointer for at least one function that uses a pic stub to
3668 be able to calculate the plt address referenced.
3669 (c) means gdb would need to set multiple breakpoints (or
3719 /* The following functions are specific to the ELF linker, while
3727 PowerPC64-ELF uses a similar scheme to PowerPC64-XCOFF in that
3729 symbol. A call to foo in a relocatable object file looks like:
3747 unsurprisingly just goes to .foo and the .opd information is unused.
3750 copied to the plt, and the linker patches the nop.
3770 The "reloc ()" notation is supposed to indicate that the linker emits
3778 to carefully copy dynamic link information from one symbol to the other.
3782 creating a shared library containing foo, we need to have both symbols
3783 dynamic so that references to .foo are satisfied during the early
3784 stages of linking. Otherwise the linker might decide to pull in a
3826 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
3828 section, and instead use a dynamic relocation to point into the
3835 initialized to the address of a function in a shared library will
3837 redefines the function descriptor symbol to point to the copy. This
3854 Similar to the above, but a 24 bit branch in the stub section won't
3862 Used to call a function in a shared library. If it so happens that
3874 code to adjust the value and save r2 to support multiple toc sections.
3911 /* This is the section to which stubs in the group will be attached. */
3915 /* Whether to emit a copy of register save/restore functions in this
3934 value when building the stubs (so the stub knows where to jump. */
3958 /* Used to track dynamic relocations for local symbols. */
3978 /* A pointer to the most recently used stub hash entry against this
3982 /* A pointer to the next symbol starting with a '.' */
3989 /* Chain of aliases referring to a weakdef. */
4012 tls_optimize clears TLS_GD .. TLS_TPREL when optimizing to
4059 /* The section group that this section belongs to. */
4077 /* Shortcuts to get to dynamic linker sections. */
4084 /* Shortcut to .__tls_get_addr and __tls_get_addr. */
4109 /* Whether func_desc_adjust needs to be run over symbols. */
4119 /* Rename some of the generic section flags to better document how they
4125 /* Nonzero if this section has a call to __tls_get_addr. */
4131 /* Nonzero if this section has a call to another section that uses
4249 descriptor symbol. We need to make any combination of reference and
4252 For a defined function "foo" and an undefined call to "bar":
4361 bfd_vma fields are larger. Setting the bfd_vma to zero makes
4389 /* Create .sfpr for code to save and restore fp regs. */
4538 Stub names need to include a section id, as there may well be
4539 more than one stub used to reach say, printf, and we need to
4570 /* Add a new stub entry to the stub hash. Not all fields of the new
4688 struct ppc_link_hash_entry *to)
4692 if (to->elf.plt.plist != NULL)
4701 for (dent = to->elf.plt.plist; dent != NULL; dent = dent->next)
4711 *entp = to->elf.plt.plist;
4714 to->elf.plt.plist = from->elf.plt.plist;
4737 /* If called to transfer flags for a weakdef during processing
4752 /* If we were called to copy over info for a weak sym, don't copy
4753 dyn_relocs, plt/got info, or dynindx. We used to copy dyn_relocs
4754 in order to simplify readonly_dynrelocs and save a field in the
4758 Chain weakdefs so we can get from the weakdef back to an alias.
4759 The list is circular so that we don't need to use u.weakdef as
4760 well as this list to look at all aliases. */
4799 /* Add reloc counts against the indirect sym to the direct sym
4823 /* Copy over got entries that we may have already seen to the
4928 /* Fix function descriptor symbols defined in .opd sections to be
4955 code is in a discarded group, let it appear to be undefined. */
5004 /* Hook called on merging a symbol. We use this to clear "fake" since
5020 /* This function makes an old ABI object reference to ".bar" cause the
5055 /* This function satisfies all old ABI object references to ".bar" if a
5090 /* Make an undefined function descriptor sym, in order to
5110 /* Propagate reference flags from entry symbol to function
5163 We don't want to necessarily keep everything referenced by
5166 want to keep the function code symbol's section. This is
5167 easy for global symbols, but for local syms we need to keep
5220 not to be needed. */
5368 and PLT reference counting (ie. we don't allow them to create GOT
5369 or PLT entries), there's no possibility or desire to optimize TLS
5370 relocs, and there's not much point in propagating relocs to shared
5455 /* These special tls relocs tie a call to __tls_get_addr with
5548 /* We may also need a plt entry if the symbol turns out to be
5574 /* It does not make sense to have a procedure linkage
5588 /* The following relocations don't need to propagate the
5674 we are going to need a stub. */
5725 refers to is in a shared lib. */
5779 /* One extra to simplify get_tls_mask. */
5796 -1 to indicate GD and -2 to indicate LD. */
5861 /* We may need a .plt entry if this reloc refers to a
5887 against a local symbol, then we need to copy the reloc
5889 -Bsymbolic, we do not need to copy a reloc against a
5903 may need to keep relocations for symbols satisfied by a
5904 dynamic library if we manage to avoid copy relocs for the
5960 We really need local syms available to do this
6008 /* Merge backend specific data from an object file to the output
6247 function size and set *CODE_OFF to the function's entry point,
6286 symbol. This size has nothing to do with the code size of the
6287 function, which is what we're supposed to return, but the
6293 1 here to avoid it incorrectly caching a larger function size
6452 function code sym section to be marked. */
6518 function code sym section to be marked. */
6985 /* Called via elf_link_hash_traverse to transfer dynamic linking
6986 information on function code symbol entries to their corresponding
7017 /* Resolve undefined references to dot-symbols as the value
7019 This is to satisfy cases like ".quad .foo". Calls to functions
7066 /* Transfer dynamic linking information to the function descriptor. */
7090 are really in the library we must leave global to prevent the
7118 this hook to a) provide some gcc support functions, and b) transfer
7120 entries, to their corresponding function descriptor symbol entries. */
7151 /* Make .TOC. defined so as to prevent it being made dynamic.
7176 /* Return true if we have dynamic relocs against H that apply to
7197 aliases, that apply to read-only sections. */
7250 dynamic object, but we're not including those sections. We have to
7251 change the definition to something the rest of the link can
7290 doesn't require us to define the function symbol in the
7314 processor independent code will have arranged for us to see the
7328 only references to the symbol are via the global offset table.
7334 /* If there are no references to this symbol that do not use the
7335 GOT, we don't need to generate a copy reloc. */
7352 to an incorrect program. */
7364 sections. Allow them to proceed, but warn that this might
7372 /* This is a reference to a symbol defined by a dynamic object which
7379 from the dynamic object to this symbol will go through the global
7380 offset table. The dynamic linker will use the .dynsym entry to
7382 both the dynamic object and the regular object will refer to the
7385 /* We must generate a R_PPC64_COPY reloc to tell the dynamic linker
7386 to copy the initial value out of the dynamic object and into the
7387 runtime process image. We need to remember the offset into the
7388 .rela.bss section we are going to use. */
7429 /* We aren't supposed to use alloca in BFD because on
7431 calls xmalloc, which might cause the program to crash
7433 return status, so there's no way to gracefully return an
7873 would be possible to remove many more entries for statically linked
7924 /* First run through the relocs to check they are sane, and to
7925 determine whether we need to edit this opd section. */
7940 only interested in the reloc pointing to a function entry
7948 Also, there's nothing to prevent someone putting
7996 discarding the function due to a linker script /DISCARD/,
8143 to be dropped. */
8174 /* Redefine the function descriptor symbol to
8176 necessary to update the value here rather
8187 we'd need to look through the local syms
8203 /* We need to adjust any reloc offsets to point to the
8306 /* Move dynamic linking info to the function descriptor sym. */
8329 make __tls_get_addr point to __tls_get_addr_opt. */
8414 opportunities. The linker has been hacked (see ppc64elf.em) to do
8417 to know the tp offset, and we need to optimize before allocating
8440 On the second pass twiddle tls_mask flags to notify
8539 that conceivably belongs to the __tls_get_addr arg
8570 that turns out to be the case. */
8744 could just mark this symbol to exclude it
8745 from tls optimization but it's safer to skip
8809 /* We managed to get rid of a got entry. */
8853 /* Called via elf_link_hash_traverse from ppc64_elf_edit_toc to adjust
8946 /* Examine all relocs referencing .toc sections in order to remove
8998 /* Run through the relocs to see which toc entries might be
9041 /* Anything in the toc ought to be aligned to 8 bytes.
9063 to
9338 /* Do all the relocs again, to catch reference
9353 to to an entry more than one doubleword in size. */
9605 instructions limited to +/-32k offsets. */
9691 to TPREL. */
9697 /* This was a GD entry that has been converted to TPREL. If
9698 there happens to be a TPREL entry we can use that one. */
9716 we call merge_got_entries. Otherwise we risk merging to empty
9767 dynamic pc-relative relocs against symbols which turn out to
9769 discard space for relocs that have become local due to symbol
9776 can be generated via assembly. We want calls to
9777 protected symbols to resolve directly to the function
9779 pointer comparisons to work as expected then they should
9814 /* A plt entry is always created when making direct calls to
9828 to be treated like PLT entries and thus have dynamic
9838 symbols which turn out to need copy relocs or are not
9912 /* We also need to make an entry in the .rela.plt section. */
9936 to set up space for global entry stubs. These are put in glink,
9968 need to define the symbol in the executable on a call stub.
9969 This is to avoid text relocations. */
9980 /* Set DF_TEXTREL if we find any dynamic relocs that apply to
10022 /* Set the contents of the .interp section to the interpreter. */
10058 it is a copy of a linkonce section or due to
10127 /* Allocate space for calls to local STT_GNU_IFUNC syms in .iplt. */
10226 to copy relocs into the output file. */
10239 output file. This is mostly to handle .rela.bss and
10242 before the linker maps input sections to output
10245 function which decides whether anything needs to go
10303 /* Add some entries to the .dynamic section. We fill in the
10350 /* If any dynamic relocs apply to a read-only section,
10417 in a regular object file, then it is pointless trying to make
10466 to update a plt entry in one thread and have another thread see a
10468 barrier in the call stub. One solution is to make the load of the
10469 toc word seem to appear to depend on the load of the function entry
10470 word. Another solution is to test for r2 being zero, and branch to
10481 The solution involving the compare turns out to be faster, so
10525 then return the padding needed to do so. */
10569 bfd_vma to, from;
10573 to = (glinkoff
10586 cmp_branch_off = to - from;
10841 /* Massage our args to the form they really have. */
10858 /* Branches are relative. This is where we are going to. */
11006 translated from input file to output file form, so
11285 /* Massage our args to the form they really have. */
11298 /* Don't make stubs to out-of-line register save/restore
11529 for the input section to be the offset relative to the
11531 offset allows us to move the toc as a whole without
11547 /* During the second pass toc_first_sec points to the start of
11548 a toc group, and toc_curr is used to track the old elf_gp.
11549 We use toc_bfd to ensure we only look at each bfd once. */
11568 /* Called via elf_link_hash_traverse to merge GOT entries for global
11582 /* Called via elf_link_hash_traverse to allocate GOT entries for global
11599 /* Called on the first multitoc pass after the last call to
11670 /* Now reallocate the got, local syms first. We don't need to
11772 /* Set up for second pass over toc sections to recalculate elf_gp
11793 calls, then there's no need to use toc adjusting stubs when branching
11830 /* Look for branches to outside of this section. */
11863 /* Calls to dynamic lib functions go through a plt call stub
11879 /* Assume branches to other sections not included in the
11880 link need stubs too, to cover -R and absolute syms. */
11923 /* Ignore branch to self. */
11948 /* If calling back to a section in the process of being
11954 /* Branches to another section that itself doesn't have any TOC
11955 references are OK. Recursively call ourselves to check. */
11961 sections that call back to current won't be marked as
12011 Build lists of input sections to determine groupings between which
12025 /* This happens to make the list in reverse order,
12036 .fixup contains branches, but only back to the function that
12104 sections may result in fewer stubs. More importantly, we need to
12173 /* OK, the size from the start of CURR to the end is less
12178 here, as stubs contribute to the final output section
12199 /* But wait, there's more! Input sections up to group_size
12242 handles cases like htab->brlt which is mapped to its own output
12263 The basic idea here is to examine all the relocations looking for
12264 PC-relative calls to a target that is unreachable with a "bl"
12332 exit on a stub section shrinking. This is to break out of a
12334 section gaps (perhaps due to alignment), which then requires
12362 /* Walk over each section attached to the input bfd. */
12370 to do. */
12517 /* Fixup old ABI sym to point at code
12538 call to what looks like a local sym is in
12732 /* Ask the linker to do its stuff. */
12770 /* Offset to stub section, written later. */
12791 /* Offset to .glink, written later. */
12875 o references to TOC base (SYM@toc / TOC[tc0]) without a
12937 /* Called via elf_link_hash_traverse from ppc64_elf_build_stubs to
13031 The stubs are kept in a hash table attached to the main linker
13047 /* Allocate memory to hold the linker stubs. */
13253 bfd_elf_discard_info didn't make any changes to the section. */
13292 /* What to do when ld finds relocations against symbols defined in
13311 to handle the relocations for a section.
13322 This function does not have to worry about setting the reloc
13325 LOCAL_SYMS is a pointer to the swapped in local symbols.
13328 corresponding to the st_shndx field of each local symbol.
13335 going to be the section symbol corresponding to the output
13423 proper TOC base to use. */
13485 an input section. Transfer the symbol to an
13486 appropriate input .opd section, so that a branch to
13487 this symbol will be mapped to the location specified
13519 non-debug to preserve relocs in .eh_frame which the
13520 eh_frame editing code expects to be present. */
13702 /* We changed the symbol. Start over in order to
13728 /* We changed the symbol. Start over in order to
13778 /* If not using the newer R_PPC64_TLSGD/LD to mark
13790 need to keep the destination reg. It may be
13791 something other than the usual r3, and moved to r3
13868 to get h, sym, sec etc. right. */
14046 used by ELFv2 global entry points to set up r2, to
14123 /* Calls to functions with a different TOC, such as calls to
14124 shared objects, need to alter the TOC pointer. This is
14125 done using a linkage stub. A REL24 branching to these
14126 linkage stubs needs to be followed by a nop, as the nop
14127 will be replaced with an instruction to restore the TOC
14146 replaced by an insn to restore r2. */
14188 /* Allow crt1 branch to go via a toc adjusting
14202 It isn't possible to cheaply verify we have
14203 exactly such a call. Allow all calls to the same
14225 (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
14231 (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
14263 /* If the branch is out of reach we ought to have a long
14336 /* NOP out calls to undefined weak functions.
14416 /* Relocation is to the entry for this symbol in the global
14440 locally, or the symbol was forced to be local
14475 least significant bit to record whether we have already
14606 /* Relocation is to the entry for this symbol in the
14660 /* TOC16 relocs. We want the offset relative to the TOC base,
14714 resolve to zero. This is really just a tweak, since
14715 code using weak externs ought to check that they are
14771 /* Relocations that may need to be propagated if this is a
14818 are copied into the output file to be resolved at run
14857 /* This symbol is local, or marked to become local,
14887 /* We need to relocate .opd contents for ld.so.
14890 *r_offset equal to r_addend. */
14964 be computed at runtime, so there's no need to do
14978 to improve backward compatibility with older
14982 /* Adjust pc_relative relocs to have zero in *r_offset. */
15023 to nop; addi rb,r2,x; */
15036 offset to later add to r2, perhaps in an indexed
15037 addressing mode instruction. Don't try to optimize.
15040 we need to check the high insn when optimizing the low
15073 /* Transform addic to addi when we change reg. */
15113 alone (it will be set to zero elsewhere in the link). */
15153 a hack, but the "correct" way to do this by defining _DQ
15155 this file. It doesn't make much sense to use these
15271 on a branch to zero when foo is undefined. */
15310 /* It is too late to remove an empty reloc section. Leave
15437 (this is a clue for the dynamic linker, to make
15440 to zero. */
15484 /* Used to decide how to sort relocs in an optimal manner for the
15553 /* We stupidly defined DT_PPC64_GLINK to be the start
15555 what ld.so needs, and now have a bigger stub to
15602 We use it to hold the link-time TOCbase. */
15619 /* brlt is SEC_LINKER_CREATED, so we need to write out relocs for
15656 /* Offset to stub section. */
15684 /* Offset to .glink. */
15715 /* We need to handle writing out multiple GOT sections ourselves,
15716 since we didn't add them to DYNOBJ. We know dynobj is the first