Lines Matching refs:sec

361 ip2k_nominal_page_bits (abfd, sec, addr, contents)
363 asection *sec;
367 bfd_vma page = PAGENO (BASEADDR (sec) + addr);
373 if (PAGENO (BASEADDR (sec)) == page)
380 while (PAGENO (BASEADDR (sec) + addr - 2) == page)
390 if (ip2k_is_switch_table_128 (abfd, sec, addr, contents) != -1)
394 if (ip2k_is_switch_table_256 (abfd, sec, addr, contents) != -1)
416 ip2k_test_page_insn (abfd, sec, irel, misc)
418 asection *sec;
434 ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents))
441 ip2k_delete_page_insn (abfd, sec, irel, again, misc)
443 asection *sec;
449 elf_section_data (sec)->relocs = misc->irelbase;
450 elf_section_data (sec)->this_hdr.contents = misc->contents;
457 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
496 ip2k_is_switch_table_128 (abfd, sec, addr, contents)
498 asection *sec;
506 if (addr + 4 > sec->size)
537 ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc)
539 asection *sec;
544 Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
553 if (addr + 4 > sec->size)
575 if (! ip2k_test_page_insn (abfd, sec, ireltest, misc))
592 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2))
600 if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
649 ip2k_is_switch_table_256 (abfd, sec, addr, contents)
651 asection *sec;
659 if (addr + 4 > sec->size)
704 ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc)
706 asection *sec;
711 Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
721 if (addr + 4 > sec->size)
744 if (!ip2k_test_page_insn (abfd, sec, ireltest, misc))
772 if (!ip2k_elf_relax_delete_bytes (abfd, sec, addr + 0, 6))
780 if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
799 ip2k_elf_relax_section (abfd, sec, link_info, again)
801 asection *sec;
825 first_section = sec;
828 if (first_section == sec)
838 || (sec->flags & SEC_RELOC) == 0
839 || sec->reloc_count == 0
840 || (sec->flags & SEC_CODE) == 0)
845 internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL,
868 if (elf_section_data (sec)->this_hdr.contents != NULL)
869 contents = elf_section_data (sec)->this_hdr.contents;
873 if (!bfd_malloc_and_get_section (abfd, sec, &contents))
910 if ((BASEADDR (sec) + sec->size < search_addr)
911 && (BASEADDR (sec) + sec->size > page_end))
913 if (BASEADDR (sec) <= page_end)
916 search_addr = BASEADDR (sec);
933 if ((BASEADDR (sec) + sec->size >= page_start)
934 && (BASEADDR (sec) <= page_end))
936 if (!ip2k_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end))
954 && elf_section_data (sec)->this_hdr.contents != contents)
961 elf_section_data (sec)->this_hdr.contents = contents;
966 && elf_section_data (sec)->relocs != internal_relocs)
976 && elf_section_data (sec)->this_hdr.contents != contents)
979 && elf_section_data (sec)->relocs != internal_relocs)
987 ip2k_elf_relax_section_page (abfd, sec, again, misc, page_start, page_end)
989 asection *sec;
995 Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
1007 if (BASEADDR (sec) + irel->r_offset < page_start)
1013 if (BASEADDR (sec) + irel->r_offset > page_end)
1018 switch_table_128 = ip2k_is_switch_table_128 (abfd, sec, irel->r_offset, misc->contents);
1019 switch_table_256 = ip2k_is_switch_table_256 (abfd, sec, irel->r_offset, misc->contents);
1027 if (!ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc))
1035 if (!ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc))
1042 if (ip2k_test_page_insn (abfd, sec, irel, misc))
1044 if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
1066 adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
1068 asection *sec;
1087 shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
1089 contents = elf_section_data (sec)->this_hdr.contents;
1091 irelbase = elf_section_data (sec)->relocs;
1092 irelend = irelbase + sec->reloc_count;
1109 bfd_vma baseaddr = BASEADDR (sec);
1166 if (sym_sec == sec)
1173 bfd_vma baseaddr = BASEADDR (sec);
1280 && sym_hash->root.u.def.section == sec)
1294 ip2k_elf_relax_delete_bytes (abfd, sec, addr, count)
1296 asection *sec;
1300 bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
1301 bfd_vma endaddr = sec->size;
1307 sec->size -= count;
1309 adjust_all_relocations (abfd, sec, addr + count, endaddr, -count, 0);
1498 asection * sec;
1511 sec = NULL;
1516 sec = local_sections [r_symndx];
1517 relocation = BASEADDR (sec) + sym->st_value;
1521 name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
1530 h, sec, relocation,
1590 ip2k_elf_gc_mark_hook (sec, info, rel, h, sym)
1591 asection *sec;
1624 if (!(elf_bad_symtab (sec->owner)
1628 return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
1634 ip2k_elf_gc_sweep_hook (abfd, info, sec, relocs)
1637 asection *sec ATTRIBUTE_UNUSED;