Lines Matching refs:ldhdr
117 struct internal_ldhdr ldhdr;
252 xcoff_get_ldhdr (bfd *abfd, asection *lsec, struct internal_ldhdr *ldhdr)
257 bfd_xcoff_swap_ldhdr_in (abfd, contents, ldhdr);
258 if (ldhdr->l_nsyms != 0)
260 bfd_vma symoff = bfd_xcoff_loader_symbol_offset (abfd, ldhdr);
265 if (_bfd_mul_overflow (ldhdr->l_nsyms, onesym, &syms)
269 if (ldhdr->l_stlen != 0
270 && (ldhdr->l_stoff > lsec->size
271 || ldhdr->l_stlen > lsec->size - ldhdr->l_stoff))
273 if (ldhdr->l_nreloc != 0)
275 bfd_vma reloff = bfd_xcoff_loader_reloc_offset (abfd, ldhdr);
280 if (_bfd_mul_overflow (ldhdr->l_nreloc, onerel, &rels)
284 if (ldhdr->l_nimpid != 0
285 && (ldhdr->l_impoff > lsec->size
286 || ldhdr->l_istlen > lsec->size - ldhdr->l_impoff))
303 struct internal_ldhdr ldhdr;
318 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
322 return (ldhdr.l_nsyms + 1) * sizeof (asymbol *);
332 struct internal_ldhdr ldhdr;
350 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
354 strings = (char *) contents + ldhdr.l_stoff;
356 symbuf = bfd_zalloc (abfd, ldhdr.l_nsyms * sizeof (* symbuf));
360 elsym = contents + bfd_xcoff_loader_symbol_offset(abfd, &ldhdr);
362 elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz(abfd);
382 else if (ldsym._l._l_l._l_offset < ldhdr.l_stlen)
410 return ldhdr.l_nsyms;
420 struct internal_ldhdr ldhdr;
435 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
439 return (ldhdr.l_nreloc + 1) * sizeof (arelent *);
451 struct internal_ldhdr ldhdr;
468 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
472 relbuf = bfd_alloc (abfd, ldhdr.l_nreloc * sizeof (arelent));
476 elrel = contents + bfd_xcoff_loader_reloc_offset(abfd, &ldhdr);
478 elrelend = elrel + ldhdr.l_nreloc * bfd_xcoff_ldrelsz(abfd);
500 else if (ldrel.l_symndx - 3 < ldhdr.l_nsyms)
526 return ldhdr.l_nreloc;
918 struct internal_ldhdr ldhdr;
957 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
965 strings = (char *) contents + ldhdr.l_stoff;
967 elsym = contents + bfd_xcoff_loader_symbol_offset(abfd, &ldhdr);
969 elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz(abfd);
990 else if (ldsym._l._l_l._l_offset < ldhdr.l_stlen)
2409 struct internal_ldhdr ldhdr;
2420 contents = xcoff_get_ldhdr (abfd, lsec, &ldhdr);
2424 strings = (char *) contents + ldhdr.l_stoff;
2426 elsym = contents + bfd_xcoff_loader_symbol_offset (abfd, &ldhdr);
2428 elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz (abfd);
2448 else if (ldsym._l._l_l._l_offset < ldhdr.l_stlen)
3747 struct internal_ldhdr *ldhdr;
3755 ldhdr = &htab->ldhdr;
3760 if (ldhdr->l_version != 0
3761 && ldhdr->l_nsyms == ldinfo->ldsym_count
3762 && ldhdr->l_nreloc == ldinfo->ldrel_count)
3771 if (ldhdr->l_nimpid == 0)
3783 ldhdr->l_istlen = impsize;
3784 ldhdr->l_nimpid = impcount;
3788 ldhdr->l_version = bfd_xcoff_ldhdr_version(output_bfd);
3789 ldhdr->l_nsyms = ldinfo->ldsym_count;
3790 ldhdr->l_nreloc = ldinfo->ldrel_count;
3791 ldhdr->l_impoff = (bfd_xcoff_ldhdrsz (output_bfd)
3792 + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (output_bfd)
3793 + ldhdr->l_nreloc * bfd_xcoff_ldrelsz (output_bfd));
3794 ldhdr->l_stlen = ldinfo->string_size;
3795 stoff = ldhdr->l_impoff + ldhdr->l_istlen;
3797 ldhdr->l_stoff = 0;
3799 ldhdr->l_stoff = stoff;
3801 /* 64 bit elements to ldhdr
3805 ldhdr->l_symoff = bfd_xcoff_ldhdrsz (output_bfd);
3806 ldhdr->l_rldoff = (bfd_xcoff_ldhdrsz (output_bfd)
3807 + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (output_bfd));
3811 lsec->size = stoff + ldhdr->l_stlen;
4026 struct internal_ldhdr *ldhdr;
4033 ldhdr = &htab->ldhdr;
4039 BFD_ASSERT (ldhdr->l_nsyms == ldinfo->ldsym_count);
4040 BFD_ASSERT (ldhdr->l_nreloc == ldinfo->ldrel_count);
4050 bfd_xcoff_swap_ldhdr_out (output_bfd, ldhdr, lsec->contents);
4053 out = (char *) lsec->contents + ldhdr->l_impoff;
4073 BFD_ASSERT ((bfd_size_type) ((bfd_byte *) out - lsec->contents) == ldhdr->l_impoff + ldhdr->l_istlen);
7023 + (xcoff_hash_table (info)->ldhdr.l_nsyms
7533 + xcoff_hash_table (info)->ldhdr.l_impoff));