Lines Matching defs:*toc*

57 extern void dump_toc PARAMS ((PTR));
59 /* The toc is a set of bfd_vma fields. We use the fact that valid
64 The first time we actually write a reference to the toc in the bfd,
110 /* As we wonder around the relocs, we'll keep the assigned toc_offset
112 bfd_vma toc_offset; /* Our addition, as required. */
168 SET_UNALLOCATED (ret->toc_offset);
218 /* The nt loader points the toc register to &toc + 32768, in order to
220 for this when we fix up loads displaced off the toc reg. */
222 #define TOC_SECTION_NAME ".private.toc"
289 /* This is essentially the same as tocrel16, with TOCDEFN assumed. */
303 /* TOC slot defined in file (or, data in toc). */
335 static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
389 toc.
552 ppc_toc16_reloc, /* special_function */
793 extern bfd * bfd_of_toc_owner;
794 extern long int global_toc_size;
799 enum toc_type
801 default_toc,
802 toc_32,
803 toc_64
810 tocdata
825 static void record_toc
829 record_toc (toc_section, our_toc_offset, cat, name)
830 asection *toc_section;
831 bfd_signed_vma our_toc_offset;
835 /* Add this entry to our toc addr-offset-name list. */
842 t->offset = our_toc_offset;
845 t->addr = toc_section->output_offset + our_toc_offset;
861 static bfd_boolean ppc_record_toc_entry
862 PARAMS ((bfd *, struct bfd_link_info *, asection *, int, enum toc_type));
866 /* Record a toc offset against a symbol. */
868 ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
873 enum toc_type toc_kind ATTRIBUTE_UNUSED;
890 local_syms = obj_coff_local_toc_table(abfd);
902 obj_coff_local_toc_table (abfd) = local_syms;
912 local_syms[sym] = global_toc_size;
913 global_toc_size += 4;
916 if (global_toc_size > 65535)
928 /* Check to see if there's a toc slot allocated. If not, do it
930 if (IS_UNALLOCATED(h->toc_offset))
932 h->toc_offset = global_toc_size;
933 global_toc_size += 4;
936 if (global_toc_size >= 65535)
948 /* Record a toc offset against a symbol. */
1010 asection *toc_section = 0;
1119 bfd_signed_vma our_toc_offset;
1124 if (toc_section == 0)
1126 toc_section = bfd_get_section_by_name (bfd_of_toc_owner,
1129 if ( toc_section == NULL )
1131 /* There is no toc section. Something is very wrong. */
1137 use the 1 bit to tell us whether or not a toc offset has been
1139 the 1 bit to tell us if we've written this particular toc
1145 int *local_toc_table;
1151 local_toc_table = obj_coff_local_toc_table(input_bfd);
1152 our_toc_offset = local_toc_table[symndx];
1154 if (IS_WRITTEN(our_toc_offset))
1159 MAKE_ADDR_AGAIN(our_toc_offset);
1163 /* Write out the toc entry. */
1164 record_toc (toc_section, our_toc_offset, priv,
1168 toc_section->contents + our_toc_offset);
1170 MARK_AS_WRITTEN(local_toc_table[symndx]);
1177 our_toc_offset = h->toc_offset;
1184 a value. He/She does this by setting the tocdefn bit,
1185 and not supplying a toc definition. The behaviour is
1187 symbol and the actual location of the toc as the toc
1192 the toc, some trippy library code trying for speed on
1194 the IAT to be part of the toc, thus saving a load. */
1196 our_toc_offset = val - (toc_section->output_section->vma
1197 + toc_section->output_offset);
1200 if ((bfd_vma) our_toc_offset >= 65535)
1205 (unsigned long) our_toc_offset);
1210 record_toc (toc_section, our_toc_offset, pub,
1213 else if (IS_WRITTEN (our_toc_offset))
1218 MAKE_ADDR_AGAIN(our_toc_offset);
1222 record_toc(toc_section, our_toc_offset, pub,
1225 /* Write out the toc entry. */
1227 toc_section->contents + our_toc_offset);
1229 MARK_AS_WRITTEN(h->toc_offset);
1244 bfd_vma addr = (toc_section->output_section->vma
1245 + toc_section->output_offset + our_toc_offset);
1255 && (bfd_vma) our_toc_offset > toc_section->size)
1259 input_bfd, (unsigned long) toc_section->size);
1264 /* Now we know the relocation for this toc reference. */
1265 relocation = our_toc_offset + TOC_LOAD_ADJUSTMENT;
1274 the reloc contains the required toc restore instruction. */
1520 long int global_toc_size = 4;
1522 bfd* bfd_of_toc_owner = 0;
1539 dump_toc (vfile)
1557 else if (t->cat == tocdata)
1558 cat = _("data-in-toc ");
1560 if (t->offset > global_toc_size)
1562 if (t->offset <= global_toc_size + thunk_size)
1567 _("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"),
1568 global_toc_size, global_toc_size,
1586 ppc_allocate_toc_section (info)
1594 if ( global_toc_size == 0 ) /* FIXME: does this get me in trouble? */
1597 if (bfd_of_toc_owner == 0)
1598 /* No toc owner? Something is very wrong. */
1601 s = bfd_get_section_by_name ( bfd_of_toc_owner , TOC_SECTION_NAME);
1603 /* No toc section? Something is very wrong. */
1606 amt = global_toc_size;
1607 foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, amt);
1608 memset(foo, test_char, (size_t) global_toc_size);
1610 s->size = global_toc_size;
1628 /* Rummage around all the relocs and map the toc. */
1658 toc entry. */
1660 ok = ppc_record_toc_entry(abfd, info, sec,
1661 rel->r_symndx, default_toc);
1721 ppc_toc16_reloc (abfd, reloc_entry, symbol, data,
1820 3. IMAGE_REL_PPC_TOCDEFN - toc slot definition in the file
1889 3. IMAGE_REL_PPC_TOCDEFN - toc slot definition in the file
2041 if (abfd == bfd_of_toc_owner)
2050 return bfd_of_toc_owner;
2054 the toc section is written last.