Lines Matching refs:sec

2535 #define ppc64_elf_section_data(sec) \
2536 ((struct _ppc64_elf_section_data *) elf_section_data (sec))
2539 ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
2547 sec->used_by_bfd = sdata;
2549 return _bfd_elf_new_section_hook (abfd, sec);
2553 get_opd_info (asection * sec)
2555 if (sec != NULL
2556 && ppc64_elf_section_data (sec) != NULL
2557 && ppc64_elf_section_data (sec)->opd.adjust != NULL)
2558 return ppc64_elf_section_data (sec)->opd.adjust;
2885 asection *sec = abfd->sections;
2899 sec = syms[mid]->section;
2905 sec = syms[lo - 1]->section;
2907 for (; sec != NULL; sec = sec->next)
2909 if (sec->vma > ent)
2911 if ((sec->flags & SEC_ALLOC) == 0
2912 || (sec->flags & SEC_LOAD) == 0)
2914 if ((sec->flags & SEC_CODE) != 0)
2915 s->section = sec;
3018 asection *sec;
3795 if (q->sec == p->sec)
3955 asection **sec,
3958 if (*sec != NULL
3959 && strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
4172 asection *sec, const Elf_Internal_Rela *relocs)
4191 if ((sec->flags & SEC_ALLOC) == 0)
4204 if (strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0)
4221 amt = sec->size * sizeof (union opd_info) / 8;
4225 ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
4232 rel_end = relocs + sec->reloc_count;
4279 sec->has_tls_reloc = 1;
4289 sec->has_gp_reloc = 1;
4379 sec->has_gp_reloc = 1;
4385 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
4392 if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
4412 sec->has_tls_reloc = 1;
4419 sec->has_tls_reloc = 1;
4427 sec->has_tls_reloc = 1;
4457 sec->has_tls_reloc = 1;
4469 if (ppc64_elf_section_data (sec)->t_symndx == NULL)
4472 bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1;
4473 ppc64_elf_section_data (sec)->t_symndx = bfd_zalloc (abfd, amt);
4474 if (ppc64_elf_section_data (sec)->t_symndx == NULL)
4478 ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8] = r_symndx;
4483 ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -1;
4485 ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -2;
4523 s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
4527 else if (s != sec)
4611 elf_section_data (sec)->rel_hdr.sh_name));
4616 || strcmp (bfd_get_section_name (abfd, sec),
4634 if ((sec->flags & SEC_ALLOC) != 0)
4641 elf_section_data (sec)->sreloc = sreloc;
4658 sec, r_symndx);
4667 if (p == NULL || p->sec != sec)
4674 p->sec = sec;
4725 asection *sec;
4744 sec = NULL;
4748 sec = bfd_section_from_elf_index (opd_bfd, sym->st_shndx);
4749 BFD_ASSERT ((sec->flags & SEC_MERGE) == 0);
4764 sec = rh->root.u.def.section;
4770 *code_sec = sec;
4771 if (sec != NULL && sec->output_section != NULL)
4772 val += sec->output_section->vma + sec->output_offset;
4785 ppc64_elf_gc_mark_hook (asection *sec,
4837 if (get_opd_info (sec) != NULL)
4898 rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx);
4917 asection *sec, const Elf_Internal_Rela *relocs)
4925 if ((sec->flags & SEC_ALLOC) == 0)
4928 elf_section_data (sec)->local_dynrel = NULL;
4935 relend = relocs + sec->reloc_count;
4955 if (p->sec == sec)
5536 s = p->sec->output_section;
5782 asection *sec;
5786 if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
5790 || sec == NULL
5791 || ppc64_elf_section_data (sec)->t_symndx == NULL)
5804 r_symndx = ppc64_elf_section_data (sec)->t_symndx[off / 8];
5805 next_r = ppc64_elf_section_data (sec)->t_symndx[off / 8 + 1];
5806 if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
5887 asection *sec;
5898 sec = bfd_get_section_by_name (ibfd, ".opd");
5899 if (sec == NULL)
5902 amt = sec->size * sizeof (long) / 8;
5903 opd_adjust = get_opd_info (sec);
5909 ppc64_elf_section_data (sec)->opd.adjust = opd_adjust;
5913 if (sec->output_section == bfd_abs_section_ptr)
5917 if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0)
5925 relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
5933 need_pad = sec;
5935 relend = relstart + sec->reloc_count;
6008 if (sec->size == offset + 24)
6013 if (rel == relend && sec->size == offset + 16)
6057 if ((sec->flags & SEC_IN_MEMORY) == 0)
6060 if (!bfd_malloc_and_get_section (ibfd, sec, &loc))
6068 if (elf_section_data (sec)->relocs != relstart)
6072 sec->contents = loc;
6073 sec->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS);
6076 elf_section_data (sec)->relocs = relstart;
6078 wptr = sec->contents;
6079 rptr = sec->contents;
6080 new_contents = sec->contents;
6084 new_contents = bfd_malloc (sec->size + cnt_16b * 8);
6115 if ((rel + 2 == relend && sec->size == offset + 16)
6165 = (wptr - new_contents) - (rptr - sec->contents);
6196 &elf_section_data (sec)->local_dynrel);
6199 if (p->sec == sec)
6222 sec->size = wptr - new_contents;
6223 sec->reloc_count = write_rel - relstart;
6226 free (sec->contents);
6227 sec->contents = new_contents;
6232 elf_section_data (sec)->rel_hdr.sh_size
6233 = sec->reloc_count * elf_section_data (sec)->rel_hdr.sh_entsize;
6234 BFD_ASSERT (elf_section_data (sec)->rel_hdr2 == NULL);
6237 else if (elf_section_data (sec)->relocs != relstart)
6339 asection *sec;
6350 for (sec = ibfd->sections; sec != NULL; sec = sec->next)
6351 if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
6357 relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
6363 relend = relstart + sec->reloc_count;
6381 if (elf_section_data (sec)->relocs != relstart)
6588 if (p->sec == sec)
6606 if (elf_section_data (sec)->relocs != relstart)
6829 asection *sreloc = elf_section_data (p->sec)->sreloc;
6850 asection *s = p->sec->output_section;
6932 if (!bfd_is_abs_section (p->sec)
6933 && bfd_is_abs_section (p->sec->output_section))
6942 srel = elf_section_data (p->sec)->sreloc;
6944 if ((p->sec->output_section->flags & SEC_READONLY) != 0)
7828 #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
8639 asection *sec;
8668 sec = NULL;
8680 sec = local_sections[r_symndx];
8683 relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
8684 opd_adjust = get_opd_info (sec);
8698 h_elf, sec, relocation,
8837 get h, sym, sec etc. right. */
8890 get h, sym, sec etc. right. */
9016 to get h, sym, sec etc. right. */
9101 || (sec != NULL
9102 && sec->output_section != NULL
9103 && sec->id <= htab->top_id
9104 && (htab->stub_group[sec->id].toc_off
9106 && (stub_entry = ppc_get_stub_entry (input_section, sec, fdh,
9181 && get_opd_info (sec) != NULL)
9184 bfd_vma off = (relocation - sec->output_section->vma
9185 - sec->output_offset + rel->r_addend);
9186 bfd_vma dest = opd_entry_value (sec, off, NULL, NULL);
9205 stub_entry = ppc_get_stub_entry (input_section, sec, h, rel,
9515 else if (sec != NULL && sec->id <= htab->top_id)
9516 relocation += htab->stub_group[sec->id].toc_off;
9541 if (sec != NULL)
9542 addend -= sec->output_section->vma;
9723 if (bfd_is_abs_section (sec))
9725 else if (sec == NULL || sec->owner == NULL)
9734 osec = sec->output_section;
9843 'sec' would be NULL, and we should leave the symbol
9845 if (sec != NULL)