Lines Matching defs:to

24    along with this program; if not, write to the Free Software
29 /* This file handles functionality common to the different MIPS ABI's. */
57 /* This structure is used to hold information about one GOT entry.
64 (2) a SYMBOL + OFFSET address, where SYMBOL is local to an input bfd
68 (3) a SYMBOL address, where SYMBOL is not local to an input bfd
87 that should be added to the symbol value. */
90 corresponding to a symbol in the GOT. The symbol's entry
104 /* The offset from the beginning of the .got section to the entry
105 corresponding to this symbol+addend. If it's a global symbol
106 whose offset is yet to be decided, it's going to be -1. */
112 of the symbol depends on whether it is local to the input bfd.
114 Otherwise, SYMNDX < 0 and U.H points to the symbol's hash table entry.
119 reference decays to a global GOT reference. */
141 /* This structure describes the range of addends that are applied to page
153 /* This structure is used to hold .got information when linking. */
182 /* In multi-got links, a pointer to the next got (err, rather, most
183 of the time, it points to the previous got). */
195 /* A pointer to the primary got, i.e., the one that's going to get
199 /* A non-primary got we're trying to merge with other input bfd's
214 /* A structure used to pass information to htab_traverse callbacks
248 GOT relocations are less likely to overflow if we put the associated
262 /* Information about a non-PIC interface to a PIC function. There are
263 two ways of creating these interfaces. The first is to add:
268 immediately before a PIC function "func". The second is to add:
274 to a separate trampoline section.
278 pointed to by the hash table's "strampoline" field. */
303 /* This structure is passed to mips_elf_sort_hash_table_f when sorting
311 /* The least dynamic symbol table index corresponding to a non-TLS
314 /* The greatest dynamic symbol table index corresponding to a symbol
316 with dynamic relocations pointing to it from non-primary GOTs). */
318 /* The greatest dynamic symbol table index corresponding to a local
321 /* The greatest dynamic symbol table index corresponding to an external
326 /* We make up to two PLT entries if needed, one for standard MIPS code
369 /* If there is a stub that 32 bit functions should use to call this
370 16 bit function, this points to the section containing the stub. */
373 /* If there is a stub that 16 bit functions should use to call this
374 32 bit function, this points to the section containing the stub. */
381 /* The highest GGA_* value that satisfies all references to this symbol. */
399 This is set, for example, if there are relocations related to
409 any non-PIC input file. This is used to determine whether an
414 (as opposed to a PLT entry)? */
417 /* Does this symbol resolve to a PLT entry? */
434 is set to the address of __rld_obj_head as in IRIX5 and IRIX6. */
458 /* Shortcuts to some dynamic sections, or NULL if they are not
479 /* The offset of the next standard PLT entry to create. */
482 /* The offset of the next compressed PLT entry to create. */
485 /* The index of the next .got.plt entry to create. */
506 called NAME and links it to output section OS. If IS is nonnull,
527 /* A structure used to communicate with htab_traverse callbacks. */
534 /* Starts off FALSE and is set to TRUE if the link should be aborted. */
559 included directly in this one, but there's no point to wasting
609 /* Structure used to pass information to mips_elf_output_extsym. */
630 /* These structures are used to generate the .compact_rel section on
660 unsigned long vaddr; /* VADDR to be relocated. */
685 /* These are the constants used to swap the bitfields in a crinfo. */
709 CT_MIPS_JMPAD Address to jump
737 struct exception_info *exception_info;/* Pointer to exception array. */
766 /* True if ABFD is for CPUs that are faster if JAL is converted to BAL.
772 /* True if ABFD is for CPUs that are faster if JALR is converted to BAL.
777 /* True if ABFD is for CPUs that are faster if JR is converted to B.
814 /* Whether we are trying to be compatible with IRIX at all. */
897 /* The value to write into got[1] for SVR4 targets, to identify it is
898 a GNU object. The dynamic linker can then use got[1] to store the
907 /* The maximum size of the GOT for it to be addressable using 16-bit
981 /* The mips16 compiler uses a couple of special sections to handle
985 copy floating point arguments from the fp regs to the gp regs and
986 then jump to FNNAME. If any 32 bit function calls FNNAME, the
987 call should be redirected to the stub instead. If no 32 bit
988 function calls FNNAME, the stub should be discarded. We need to
989 consider any reference to the function, not just a call, because
991 since the address might be passed to a 32 bit function.
994 that copy floating point arguments from the gp regs to the fp
995 regs and then jump to FNNAME. If FNNAME is a 32 bit function,
997 to the stub instead. If FNNAME is not a 32 bit function, the
1002 to the gp regs. These stubs store the return value in $18 while
1004 must arrange to save $18 around the call. (This case is not
1066 We rely on v0 ($2) rather than t8 ($24) to contain the address
1275 /* We use -2 as a marker to indicate that the information has
1349 /* The symbolic header contains absolute file offsets and sizes to
1581 /* We're going to create a stub for H. Create a symbol for the stub's
1582 value and size, to help make the disassembly easier to read. */
1619 /* We're about to redefine H. Create a symbol to represent H's
1620 current value and size, to help make the disassembly easier
1621 to read. */
1660 /* Return TRUE if relocations in SECTION can refer directly to a MIPS16
1661 function rather than to a hard-float stub. */
1710 objects try to call them. */
1721 /* We don't need the fn_stub; the only references to this symbol
1722 are 16 bit calls. Clobber the size to 0 to prevent it from
1736 to 0 to prevent it from being included in the link. */
1749 to 0 to prevent it from being included in the link. */
1783 /* Called by the linker to set up the la25 stub-creation code. FN is
1808 that it or its fn_stub might need $25 to be valid on entry.
1810 so they themselves never need $25 to be valid. Only non-MIPS16
1827 /* Set *SEC to the input section that contains the target of STUB.
1847 /* STUB describes an la25 stub that we have decided to implement
1849 Create the section and redirect the function symbol to it. */
1894 /* STUB describes an la25 stub that we have decided to implement
1896 the function symbol to it. */
1967 /* Create a permanent copy of ENTRY and add it to the hash table. */
1974 /* Prefer to use LUI/ADDIU stubs if the function is at the beginning
1988 sections. DATA points to a mips_htab_traverse_info structure. */
2002 collected it will have its output section set to *ABS*. */
2006 /* H is a function that might need $25 to be valid on entry.
2009 non-PIC branches and jumps to H, make sure that H has an la25
2045 R_MIPS16_26 reloc to be against a section, so the addend is
2057 immediate value as shown above, and don't forget to store the
2107 All we need to do here is shuffle the bits appropriately.
2111 Finally R_MIPS16_PC16_S1 corresponds to R_MIPS_PC16, however the
2149 /* Similar to MIPS16, the two 16-bit halves in microMIPS must be swapped
2150 on a little-endian system. This does not apply to R_MICROMIPS_PC7_S1
2151 and R_MICROMIPS_PC10_S1 relocs that apply to 16-bit instructions. */
2382 /* Set val to the offset into the section or symbol. */
2388 are producing relocatable output, we don't want to do this for
2411 /* Used to store a REL high-part relocation such as R_MIPS_HI16 or
2413 that contains the relocation field and DATA points to the start of
2434 *HI16s to be associated with a single *LO16. This significantly
2465 like any other 16-bit relocation when applied to global symbols, but is
2466 treated in the same as R_MIPS_HI16 when applied to local symbols. */
2514 want to install the addend in the same way as for a R_MIPS*_HI16
2589 we just need to add VAL to that addend. Otherwise we need to add
2590 VAL to the relocation field itself. */
2600 /* Add VAL to the relocation field. */
2791 /* This function is called via qsort() to sort the dynamic relocation
2846 /* This routine is used to write out ECOFF debugging external symbol
3031 /* A comparison routine used to sort .gptab entries. */
3043 /* Functions to manage the got entry hash table. */
3157 /* Return the GOT info for input bfd ABFD, trying to create a new one if
3186 allocated to a bfd, but the hash tables aren't. */
3195 /* Return the dynamic relocation section. If it doesn't exist, try to
3305 to G. */
3515 entry for this value, create one. If R_SYMNDX refers to a TLS symbol,
3560 indices into the primary GOT. That makes it easy to calculate the
3618 /* Find a GOT page entry that points to within 32KB of VALUE. These
3619 entries are supposed to be placed at small offsets in the GOT, i.e.,
3621 entry could be created. If OFFSETP is nonnull, use it to return the
3696 from a symbol belonging to INPUT_SECTON. Return NULL if it could not
3697 be created. If R_SYMNDX refers to a TLS symbol, create a TLS entry
3818 much information is available to elf_backend_omit_section_dynsym at
3867 /* Add 1 to local symbol indices to account for the mandatory NULL entry
3873 /* There should have been enough room in the symbol table to
3926 (which is owned by the caller and shouldn't be added to the
4046 to ABFD. */
4090 /* Add the same entry to the BFD's GOT. */
4105 /* Add room for N relocations to the .rel(a).dyn section in ABFD. */
4135 /* A htab_traverse callback for GOT entries, with DATA pointing to a
4137 entries and TLS relocs. Set DATA->value to true if we need
4138 to resolve indirect or warning symbols and then recreate the GOT. */
4164 /* A htab_traverse callback for GOT entries, with DATA pointing to a
4165 mips_elf_traverse_got_arg structure. Add all entries to DATA->g,
4167 for the target symbol. Set DATA->g to null on error. */
4266 /* If we scanned to the end of the list, or found a range whose
4315 /* A htab_traverse callback for which *REFP points to a mips_got_page_ref
4316 and for which DATA points to a mips_elf_traverse_got_arg. Work out
4318 and record that entry in DATA->g if so. Set DATA->g to null on failure. */
4337 /* Global GOT_PAGEs decay to GOT_DISP and so don't need page entries. */
4476 /* A mips_elf_link_hash_traverse callback for which DATA points to the
4504 /* On VxWorks, calls can refer directly to the .got.plt entry;
4518 /* A htab_traverse callback for GOT entries. Add each one to the GOT
4544 /* A htab_traverse callback for GOT page entries. Add each one to the GOT
4571 this would lead to overflow, 1 if they were merged successfully,
4572 and 0 if a merge failed due to lack of memory. (These values are chosen
4578 struct mips_got_info *to,
4586 if (estimate >= from->page_gotno + to->page_gotno)
4587 estimate = from->page_gotno + to->page_gotno;
4591 estimate += from->local_gotno + to->local_gotno;
4592 estimate += from->tls_gotno + to->tls_gotno;
4597 if (to == arg->primary && from->tls_gotno + to->tls_gotno)
4600 estimate += from->global_gotno + to->global_gotno;
4606 /* Transfer the bfd's got information from FROM to TO. */
4608 tga.g = to;
4617 mips_elf_replace_bfd_got (abfd, to);
4621 /* Attempt to merge GOT G, which belongs to ABFD. Try to use as much
4625 attempt to merge with the current got, or finish the current got
4646 sure not to merge a GOT which requires TLS with the primary GOT in that
4684 to GOTIDX, duplicating the entry if it has already been assigned
4709 /* Set the TLS GOT index for the GOT entry in ENTRYP. DATA points to a
4711 GOT entry. Set DATA->g to null on failure. */
4736 /* A htab_traverse callback for GOT entries, where DATA points to a
4738 symbol to DATA->value. */
4756 to a mips_elf_traverse_got_arg. Assign GOT indices to global entries
4758 the size of one GOT entry. Set DATA->g to null on failure. */
4865 See the calls to mips_elf_set_global_got_area below for more
4869 /* Try to merge the GOTs of input bfds together, as long as they
4870 don't seem to exceed the maximum GOT size, choosing one of them
4871 to be the primary GOT. */
4890 /* Map the output bfd to the primary got. That's what we're going
4891 to use for bfds that use GOT16 or GOT_PAGE relocations that we
4892 didn't mark in check_relocs, and we want a quick way to find it.
4893 We can't just use gg->next because we're going to reverse the
4898 present in the primary GOT, so arrange for them to appear after
4910 [assigned_low_gotno, local_gotno[ will be set to the range of local
4912 adding local_gotno to global_gotno. We reverse the list and make
4913 it circular since then we'll be able to quickly compute the
4917 we arrange for the main got struct to have the right number of
4921 points back to the master GOT. */
4940 list that gg points to. g->next is guaranteed to be nonnull after
4973 /* Assign offsets to global GOT entries and count how many
5147 /* Create the .got section to hold the global offset table. */
5168 /* We have to use an alignment of 2**4 here because this is hardcoded
5177 linker script because we don't want to define the symbol if we
5214 /* Return true if H refers to the special VxWorks __GOTT_BASE__ or
5237 where the onus is on the compiler or programmer to perform any
5267 the INPUT_BFD). The ADDEND is the addend to use for this
5271 On exit, set *CROSS_MODE_JUMP_P to true if the relocation field
5272 is a MIPS16 or microMIPS jump to standard MIPS code, or vice versa.
5277 overflow occurs, and bfd_reloc_ok to indicate success. */
5296 /* The final GP value to be used for the relocatable, executable, or
5302 /* The value of GP used to create the relocatable object. */
5312 /* TRUE if the symbol referred to by this relocation is a local
5315 /* TRUE if the symbol referred to by this relocation is a section
5318 /* TRUE if the symbol referred to by this relocation is "_gp_disp". */
5320 /* TRUE if the symbol referred to by this relocation is
5330 /* TRUE if this relocation refers to a MIPS16 function. */
5453 linker, so it's inappropriate to check to see whether or not
5470 and check to see if they exist by looking at their
5491 /* This is an optional symbol - an Irix specific extension to the
5493 XXX - FIXME - there is more to the spec for OPTIONAL symbols
5514 /* If this is a reference to a 16-bit function with a stub, we need
5515 to redirect the relocation to the stub unless:
5522 (c) the section allows direct references to MIPS16 functions. */
5533 /* This is a 32- or 64-bit call to a 16-bit function. We should
5534 have already noticed that we were going to need the
5546 /* If a LA25 header for the stub itself exists, point to the
5563 to a standard MIPS function, we need to redirect the call to the stub.
5578 out which one to use by checking which one appears in the input
5605 /* If this is a direct call to a PIC function, redirect to the
5620 to point to the standard PLT entry, so redirect to the compressed
5653 /* Calls from 16-bit code to 32-bit code and vice versa require the
5654 mode change. However, we can ignore calls to undefined weak symbols,
5681 to R_MIPS_GOT_DISP/R_MICROMIPS_GOT_DISP. The addend is applied by the
5691 to need it, get it now. */
5729 /* On VxWorks, CALL relocations should refer to the .got.plt
5730 entry, which is initialized to point at the PLT stub. */
5763 /* Convert GOT indices to actual offsets. */
5769 symbols are resolved by the loader. Add them to .rela.dyn. */
5787 we need to set DF_TEXTREL again, so that we do not delete the
5826 record in the output, and leave the job up to the dynamic
5827 linker. We must do the same for executable references to
5828 shared library symbols, unless we've decided to use copy
5860 mips_elf_perform_relocation. So, we just fall through to the
5994 shared literals, and then we will need to additional work
6002 order. We don't need to do anything special here; the
6017 to them before. */
6031 R_MIPS*_GOT16; every relocation evaluates to "G". */
6072 /* No need to exclude weak undefined symbols here as they resolve
6073 to 0 and never set `*cross_mode_jump_p', so this alignment check
6239 /* We're allowed to handle these two relocations identically.
6240 The dynamic linker is allowed to handle the CALL relocations
6299 it into a bal instruction. But we don't try to optimize
6341 VALUE. Use HOWTO to place VALUE into the output file at the
6342 appropriate position. The SECTION is the section to which the
6345 is a MIPS16 or microMIPS jump to standard MIPS code, or vice versa.
6386 (_("%X%H: Unsupported JALX to the same ISA mode\n"),
6397 /* Check to see if the opcode is already JAL or JALX. */
6415 convert J or JALS to JALX. */
6461 "to JALX: relocation out of range\n"),
6478 /* Try converting JAL to BAL and J(AL)R to B(AL), if the target is in
6526 /* Create a rel.dyn relocation for the dynamic linker to resolve. REL
6576 the field to be fully relocated, so add in the symbol's value. */
6581 /* We must now calculate the dynamic symbol table index to use
6590 /* ??? glibc's ld.so just adds the final GOT entry to the
6619 relocation. We want to avoid generating relocations to
6620 local symbols because we used to generate them
6623 order to give dynamic loaders and applications time to
6638 this symbol will not be referred to by the relocation, we must
6640 Otherwise leave the job up to the dynamic linker. */
6653 /* For strict adherence to the ABI specification, we should
6658 loaders seems to care, we don't waste space with these
6659 artificial relocations. If this turns out to not be true,
6661 as to make room for a pair of dynamic relocations per
6671 /* Adjust the output offset of the relocation to reference the
6680 /* Put the relocation back out. We have to use the special
6708 will be writing to it. */
6744 we need to set DF_TEXTREL again, so that we do not delete the
6917 either resolve these symbols to something in a shared
6919 we can consider these symbols to be in a new section. */
6974 to the base of the .text section. So substract the section
6975 base address to make it an offset. */
6989 to the base of the .data section. So substract the section
6990 base address to make it an offset. */
7025 have no special marking to distinguish them from LP64 objects.
7027 We don't want users of the official LP64 ABI to be punished for the
7029 to mistakenly interpret pre-4.0 ILP32 objects as being LP64 objects.
7032 - If ABFD contains a .gcc_compiled_longXX section, use it to
7040 The second check is enough to detect LP64 objects generated by pre-4.0
7047 reason to use R_MIPS_64 in an ILP32 object. Pre-4.0 compilers never
7080 /* There appears to be a bug in the MIPSpro linker that causes GOT_DISP
7081 relocations against two unnamed section symbols to resolve to the
7088 then the linker will resolve both relocations to .data and the program
7089 will jump there rather than to .text.
7091 We can work around this problem by giving names to local section symbols.
7103 sections that need the SHF_MIPS_GPREL flag by name; there has to be
7135 so that we don't have to read them again.
7137 through the section contents to see if there is an
7196 prelinker can convert .sbss from NOBITS to PROGBITS and
7197 changing it back to NOBITS breaks the binary. The entry in
7230 FIXME: We need to handle the SHF_MIPS_GPREL flag, but I'm not sure
7231 how to. */
7241 /* There ought to be a place to keep ELF backend specific flags, but
7422 section name, which is a hack, but ought to work. This routine is
7544 kind of relocations. We used to set up a second header for the
7552 /* Given a BFD section, try to locate the corresponding ELF section
7554 Actually, it's not clear to me that the 64-bit ABI supports these,
7595 a SECTION *ABS*. This causes ld to think it can resolve _gp_disp
7657 /* This code used to do *secp = bfd_und_section_ptr if
7698 /* This code used to do *secp = bfd_und_section_ptr if
7736 /* If this is a mips16 text symbol, add 1 to the value to make it
7737 odd. This will cause something like .word SYM to come up with
7801 /* We need to create .got section. */
7853 /* We need to create a .compact_rel section. */
7905 and is filled in by the rtld to contain a pointer to
7965 /* Read the addend for REL relocation REL, which belongs to bfd ABFD.
7966 HOWTO is the relocation's howto and CONTENTS points to the contents
8028 Scan ahead to find a matching LO16 relocation.
8030 According to the MIPS ELF ABI, the R_MIPS_LO16 relocation must
8056 /* Try to read the contents of section SEC in bfd ABFD. Return true and
8076 /* Make a new PLT record to keep internal data. */
8137 /* Look at the relocation information to figure out which symbol
8159 than a 16 bit function call, which refers to this symbol. */
8194 the linker maps input sections to output sections, we
8223 /* We don't need to set mips16_stubs_seen in this case.
8224 That flag is used to see whether we need to look through
8225 the global symbol table for stubs. We don't need to set
8244 to output sections, we can easily discard it by setting the
8263 /* Look at the relocation information to figure out which symbol
8285 that refers to this symbol. */
8320 the linker maps input sections to output sections, we
8349 /* We don't need to set mips16_stubs_seen in this case.
8350 That flag is used to see whether we need to look through
8351 the global symbol table for stubs. We don't need to set
8369 to output sections, we can easily discard it by setting the
8423 /* Set CAN_MAKE_DYNAMIC_P to true if we can convert this
8427 /* Set CALL_RELOC_P to true if the relocation is for a call,
8431 /* Set CONSTRAIN_SYMBOL_P if we need to take the relocation
8432 into account when deciding how to define the symbol.
8490 /* These relocations have empty fields and are purely there to
8499 /* GP-relative relocations always resolve to a definition in a
8502 always resolves to a local function even if other relocations
8510 /* In VxWorks executables, references to external symbols
8512 possible to convert this relocation into a dynamic one.
8517 usually better to do the former, unless the relocation is
8560 relocations related to taking the function's address.
8561 This doesn't apply to VxWorks, where CALL relocs refer
8562 to a .got.plt entry instead of a normal .got entry. */
8568 __GOTT_INDEX__ symbols must be left to the loader. Allocate
8593 the segment. Similar comments apply to R_MIPS*_GOT16 and
8595 always evaluate to "G". We don't count R_MIPS_GOT_HI16, or
8630 /* Make sure there is room in the regular GOT to hold the
8692 decay to GOT_DISP, so we'll need a GOT entry for it. */
8742 /* In VxWorks executables, references to external symbols
8744 no need to add a .rela.dyn entry for this relocation. */
8769 unless the symbol turns out to be undefined and
8776 For an executable, we only need to copy this
8782 /* We need it to tell the dynamic linker if there
8827 yet if we are going to create a PLT in the first place, but
8850 /* See if this reloc would need to refer to a MIPS16 hard-float stub,
8851 if there is one. We only need to handle global symbols here;
8852 we decide whether to keep or delete stubs for local symbols
8958 with a JALR relocation, that indicate where they jump to.
9024 /* Compute branch offset, from delay slot of the jump to the
9096 /* VxWorks executables are handled elsewhere; we only need to
9102 will be redirected to the target symbol. */
9107 a shared library, we will need to copy any R_MIPS_32 or
9136 the SVR4 psABI requires it to have a dynamic symbol table
9164 dynamic object, but we're not including those sections. We have to
9165 change the definition to something the rest of the link can
9195 only do this if all references to the function are through call
9207 the symbol to the stub location. This is required to make
9223 branches to the symbol, although it is unlikely that this will be
9224 used in practice due to the short ranges involved. It can occur
9237 /* If this is the first symbol to need a PLT entry, then make some
9245 /* If we're using the PLT additions to the psABI, each PLT
9248 lazily to avoid pessimizing traditional objects. */
9314 to having a MIPS16 entry. And in the case of call_stub a
9315 standard entry actually has to be used as the stub ends with a J
9326 /* Otherwise, if there are no direct calls to the function, we
9327 have a free choice of whether to use standard or compressed
9328 entries. Prefer microMIPS entries if the object is known to
9329 contain microMIPS code, so that it becomes possible to create
9355 symbol's value to the address of the stub. */
9369 dynamic will now refer to the PLT entry instead. */
9376 processor independent code will have arranged for us to see the
9387 /* Otherwise, there is nothing further to do for symbols defined
9392 /* There's also nothing more to do if we'll convert all relocations
9401 _bfd_error_handler (_("non-dynamic relocations refer to "
9412 from the dynamic object to this symbol will go through the global
9413 offset table. The dynamic linker will use the .dynsym entry to
9415 both the dynamic object and the regular object will refer to the
9438 dynamic will now refer to the local copy instead. */
9446 and the input sections have been assigned to output sections. We
9515 /* Decide which symbols need to go in the global part of the GOT and
9541 /* There's no need to allocate page entries for VxWorks; R_MIPS*_GOT16
9542 relocations against local symbols evaluate to "G", and the EABI does
9550 /* Choose the smaller of the two page estimates; both are intended to be
9562 /* VxWorks does not support multiple GOTs. It initializes $gp to
9617 section, so add a dummy entry to the end. */
9648 /* A mips_elf_link_hash_traverse callback for which DATA points to a
9688 /* Allocate offsets in the stubs section to each symbol that needs one.
9732 /* A mips_elf_link_hash_traverse callback for which DATA points to a
9802 /* Set the contents of the .interp section to the interpreter. */
9897 /* It's OK to base decisions on the section name, because none
9911 /* If this relocation section applies to a read only
9915 there exists a relocation to a read only section or
9927 to copy relocs into the output file. */
9945 rtld to contain a pointer to the _r_debug structure. */
9954 room for an extra nop to fill the delay slot. This is
9991 /* Add some entries to the .dynamic section. We fill in the
10026 absolute relocations have been converted to PC-relative. */
10118 /* REL is a relocation in INPUT_BFD that is being copied to OUTPUT_BFD.
10146 /* Adjust REL's addend to account for section merging. */
10161 RELOC_AGAINST_DISCARDED_SECTION to handle triplets of compound relocs
10163 always be the first in a triplet, the remaining two have to be processed
10165 index referred by the first reloc that applies to all the three and the
10166 remaining two never refer to an object symbol. And it is the final
10169 the relocatable field to be cleared by RELOC_AGAINST_DISCARDED_SECTION.
10172 and therefore requires to be pasted in a loop. It also defines a block
10288 stored value is sign-extended to 64 bits. */
10291 /* On big-endian systems, we need to lie about the position
10358 mask because the place to which we are writing will be
10364 ABI. Here, we need to update the addend. It would be
10365 possible to get away with just using the R_MIPS_32 reloc
10408 /* Go on to the next relocation. */
10414 supposed to treat the output of each relocation as the addend
10423 /* Figure out what value we are supposed to relocate. */
10432 /* There's nothing to do. */
10438 trying to perform the relocation at this point, so we
10439 just skip ahead to the next relocation. */
10483 ? _("Cannot convert a jump to JALX "
10486 ? _("Jump to a non-word-aligned address")
10487 : _("Jump to a non-instruction-aligned address")));
10490 ? _("Cannot convert a branch to JALX "
10492 : _("Branch to a non-instruction-aligned address"));
10520 sign-extend the 32-bit result to 64-bits, and store it as a
10522 go to extreme lengths to support this usage on systems with
10573 in the code for each one. DATA points to a mips_htab_traverse_info. */
10738 /* We've decided to create a PLT entry for this symbol. */
10774 does not matter, we just have to pick one). */
10909 /* We've decided to create a lazy-binding stub. */
10930 /* Values up to 2^31 - 1 are allowed. Larger values would cause
11029 to reset the global offset table entry for this external
11030 to its stub address when unlinking a shared object. */
11039 refer to the stub, since only the stub uses the standard calling
11096 /* Create an R_MIPS_REL32 relocation for this entry. Due to
11097 the various compatibility problems, it's easier to mock
11099 mips_elf_create_dynamic_relocation to calculate the
11189 to treat compressed symbols like any other. */
11255 entry. The branch jumps to the beginning of .plt. */
11376 /* If this is a mips16/microMIPS symbol, force the value to be even. */
11383 /* Write out a plt0 entry to the beginning of .plt. */
11567 /* We just need to copy the entry byte-by-byte. */
11619 /* Assume that we're going to modify it and write it out. */
11699 to setting DT_MIPS_GOTSYM to the same value as
11750 /* The MIPS_RLD_MAP_REL tag stores the offset to the debug
11751 pointer, relative to the address of the tag. */
11833 /* The first entry of the global offset table points to the
11837 to the lazy resolution stub. */
11923 /* Assume that we're going to modify it and write it out. */
11929 /* Reduce DT_RELSZ to account for any relocations we
11930 decided not to make. This is for the n64 irix rld,
11931 which doesn't seem to apply any relocations if there
11939 can reasonably expect the values to the same. */
12179 /* Whether to sort relocs output by ld -r or ld --emit-relocs, by r_offset.
12180 Don't do so for code sections. We want to keep ordering of HI16/LO16
12182 relocs to be sorted. */
12347 /* We want to put it after the PHDR and INTERP segments. */
12378 /* We want to put it after the PHDR and INTERP segments. */
12391 .dynamic end up in PT_DYNAMIC. However, we do have to insert a
12464 /* We want to put it after the DYNAMIC segment. */
12490 which might move one of the other sections to a different
12555 If the prelinker needs to make room for a new PT_LOAD entry, its
12556 standard procedure is to move the first (read-only) sections into
12558 .dynamic to be in a read-only segment, and the section will often
12561 Although the prelinker could in principle move .dynamic to a
12562 writable segment, it seems better to allocate a spare program
12563 header instead, and avoid the need to move any sections.
12602 /* ??? Do mips16 stub sections need to be handled special? */
12664 so it is not possible to garbage collect them at this time. */
12706 /* Copy data from a MIPS ELF indirect symbol to its direct symbol,
12840 bfd_byte *to, *from, *end;
12849 to = contents;
12857 if (to != from)
12858 memcpy (to, from, PDR_SIZE);
12859 to += PDR_SIZE;
12963 /* Note that we don't bother to ever free this information.
12968 good idea for free_cached_info to throw it away. */
13040 /* This is almost identical to bfd_generic_get_... except that some
13041 MIPS relocations need to be handled specially. Sigh. */
13052 /* Get enough memory to hold the stuff */
13085 bfd_vma gp = 0x12345678; /* initialize just to shut gcc up */
13133 /* Specific to MIPS: Deal with relocation types that require
13137 /* If we've managed to find the gp and have a special
13139 to the generic handling. */
13291 /* Check if a 5-bit register index can be abbreviated to 3 bits. */
13495 /* If PTR points to what *might* be a 16-bit branch or jump, then
13521 /* If PTR points to what *might* be a 32-bit branch or jump, then
13546 /* If PTR points to a 16-bit branch or jump with a 32-bit delay slot
13569 /* If PTR points to a 32-bit branch or jump that doesn't fiddle with REG,
13643 /* We don't have to do anything for a relocatable link, if
13675 /* The number of bytes to delete for relaxation and from where
13676 to delete these bytes starting at irel->r_offset. */
13711 /* Get the value of the symbol referred to by the reloc. */
13744 /* This appears to be a reference to an undefined
13757 /* For simplicity of coding, we are going to modify the
13759 table. We must tell the rest of the code not to free up this
13760 information. It would be possible to instead create a table
13761 of changes which have to be made, as is done in coff-mips.c;
13772 relocation is applied to, to the symbol referred. */
13777 /* R_MICROMIPS_HI16 / LUI relaxation to nil, performing relaxation
13778 of corresponding R_MICROMIPS_LO16 to R_MICROMIPS_HI0_LO16 or
13783 where pcrval has first to be adjusted to apply against the LO16
13814 actually an immediate argument to a compact branch, and let
13832 must not fiddle with the register used to hold the address.
13858 /* Now adjust pcrval, subtracting the offset to the LO16 reloc
13859 and rounding up to take masking of the two LSBs into account. */
13862 /* R_MICROMIPS_LO16 relaxation to R_MICROMIPS_HI0_LO16. */
13876 /* R_MICROMIPS_LO16 / ADDIU relaxation to R_MICROMIPS_PC23_S2.
13877 We add 4 to take LUI deletion into account while checking
13908 /* Compact branch relaxation -- due to the multitude of macros
13940 /* R_MICROMIPS_PC16_S1 relaxation to R_MICROMIPS_PC10_S1. We need
13941 to check the distance from the next instruction, so subtract 2. */
13961 /* R_MICROMIPS_PC16_S1 relaxation to R_MICROMIPS_PC7_S1. We need
13962 to check the distance from the next instruction, so subtract 2. */
13990 /* R_MICROMIPS_26_S1 -- JAL to JALS relaxation for microMIPS targets. */
14020 /* Other 32-bit instructions relaxable to 16-bit
14025 /* JAL with 32-bit delay slot that is changed to a JALS
14143 /* A function that the linker calls if we are allowed to use PLTs
14152 /* A function that the linker calls to select between all or only
14173 /* An array describing how BFD machines relate to one another. The entries
14200 better to allow vr5400 and vr5500 code to be merged anyway, since
14436 /* We need to use a special link routine to handle the .reginfo and
14437 the .mdebug sections. We need to merge all instances of these
14515 /* And calculate GP relative to that. */
14520 /* If the relocate_section function needs to do a reloc
14522 callback to warn that GP is not defined. */
14714 want to deal with it. */
14736 interesting information, try to find the symbol in
15047 /* Invoke the regular ELF backend linker to do all the work. */
15145 doesn't seem to matter. */
15150 just be able to ignore this. */
15193 /* Copy the architecture info from IBFD to OBFD. Also copy
15194 the 32-bit flag (if set) so that we continue to recognise
15205 and if that was what caused us to treat IBFD as 32-bit. */
15233 /* Only error if both are set (to different values). */
15349 /* Use the Tag_null value to indicate the attributes have been
15419 really relevant to the error message. */
15512 /* Merge backend specific data from an object file to the output
15548 /* Check to see if the input BFD actually contains any sections. If not,
15587 /* It is not possible to infer the correct ISA revision
15588 for R3 or R5 so drop down to R2 for the checks. */
15606 /* The isa_ext is allowed to be an extension of what can be inferred
15670 /* Function to keep MIPS specific file flags like as EF_MIPS_PIC. */
16154 /* Build a table of synthetic symbols to represent the PLT. As with MIPS16
16155 and microMIPS PLT slots we may have a many-to-one mapping between .plt
16160 of ASYMBOL to carry ISA annotation. The encoding used is the same as