Lines Matching refs:irel

6695 calculate_offset (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,  in calculate_offset()  argument
6704 if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info) in calculate_offset()
6709 isym = isymbuf + ELF32_R_SYM (irel->r_info); in calculate_offset()
6729 indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in calculate_offset()
6758 addend = irel->r_addend; in calculate_offset()
6761 - (irel->r_offset + sec->output_section->vma + sec->output_offset)); in calculate_offset()
6768 Elf_Internal_Rela *irel, in calculate_plt_memory_address() argument
6773 if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info) in calculate_plt_memory_address()
6778 isym = isymbuf + ELF32_R_SYM (irel->r_info); in calculate_plt_memory_address()
6799 indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in calculate_plt_memory_address()
6830 Elf_Internal_Sym *isymbuf, Elf_Internal_Rela *irel, in calculate_plt_offset() argument
6834 if ((foff = calculate_plt_memory_address (abfd, link_info, isymbuf, irel, in calculate_plt_offset()
6838 return foff - (irel->r_offset in calculate_plt_offset()
7989 calculate_memory_address (bfd *abfd, Elf_Internal_Rela *irel, in calculate_memory_address() argument
8000 if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info) in calculate_memory_address()
8003 isym = isymbuf + ELF32_R_SYM (irel->r_info); in calculate_memory_address()
8013 memcpy (&irel_fn, irel, sizeof (Elf_Internal_Rela)); in calculate_memory_address()
8023 indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in calculate_memory_address()
8050 addend = irel->r_addend; in calculate_memory_address()
8060 Elf_Internal_Rela *irel, in calculate_got_memory_address() argument
8070 symndx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in calculate_got_memory_address()
8087 + local_got_offsets[ELF32_R_SYM (irel->r_info)]; in calculate_got_memory_address()
8588 Elf_Internal_Rela *irel; in nds32_elf_relax_delete_blanks() local
8655 for (irel = internal_relocs; irel < irelend; irel++) in nds32_elf_relax_delete_blanks()
8659 if (ELF32_R_TYPE (irel->r_info) >= R_NDS32_DIFF8 in nds32_elf_relax_delete_blanks()
8660 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_DIFF32 in nds32_elf_relax_delete_blanks()
8661 && isym[ELF32_R_SYM (irel->r_info)].st_shndx == sec_shndx) in nds32_elf_relax_delete_blanks()
8668 switch (ELF32_R_TYPE (irel->r_info)) in nds32_elf_relax_delete_blanks()
8671 offset = bfd_get_8 (abfd, contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8674 offset = bfd_get_16 (abfd, contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8677 val = bfd_get_32 (abfd, contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8701 before = get_nds32_elf_blank_total (&blank_t, irel->r_addend, 0); in nds32_elf_relax_delete_blanks()
8703 irel->r_addend + offset, 0); in nds32_elf_relax_delete_blanks()
8707 switch (ELF32_R_TYPE (irel->r_info)) in nds32_elf_relax_delete_blanks()
8711 contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8715 contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8719 contents + irel->r_offset); in nds32_elf_relax_delete_blanks()
8723 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_DIFF_ULEB128 in nds32_elf_relax_delete_blanks()
8724 && isym[ELF32_R_SYM (irel->r_info)].st_shndx == sec_shndx) in nds32_elf_relax_delete_blanks()
8731 val = read_unsigned_leb128 (abfd, contents + irel->r_offset, in nds32_elf_relax_delete_blanks()
8734 before = get_nds32_elf_blank_total (&blank_t, irel->r_addend, 0); in nds32_elf_relax_delete_blanks()
8736 irel->r_addend + val, 0); in nds32_elf_relax_delete_blanks()
8740 p = contents + irel->r_offset; in nds32_elf_relax_delete_blanks()
8752 raddr = irel->r_offset; in nds32_elf_relax_delete_blanks()
8753 irel->r_offset -= get_nds32_elf_blank_total (&blank_t2, in nds32_elf_relax_delete_blanks()
8754 irel->r_offset, 1); in nds32_elf_relax_delete_blanks()
8756 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_NONE) in nds32_elf_relax_delete_blanks()
8771 && ELF32_R_TYPE (irel->r_info) != R_NDS32_LABEL in nds32_elf_relax_delete_blanks()
8772 && ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_REGION_BEGIN in nds32_elf_relax_delete_blanks()
8773 && ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_REGION_END in nds32_elf_relax_delete_blanks()
8774 && ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_ENTRY in nds32_elf_relax_delete_blanks()
8775 && ELF32_R_TYPE (irel->r_info) != R_NDS32_SUBTRAHEND in nds32_elf_relax_delete_blanks()
8776 && ELF32_R_TYPE (irel->r_info) != R_NDS32_MINUEND) in nds32_elf_relax_delete_blanks()
8778 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), in nds32_elf_relax_delete_blanks()
8784 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_NONE in nds32_elf_relax_delete_blanks()
8785 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_relax_delete_blanks()
8786 || ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY) in nds32_elf_relax_delete_blanks()
8789 if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info in nds32_elf_relax_delete_blanks()
8790 && isym[ELF32_R_SYM (irel->r_info)].st_shndx == sec_shndx in nds32_elf_relax_delete_blanks()
8791 && ELF_ST_TYPE (isym[ELF32_R_SYM (irel->r_info)].st_info) == STT_SECTION) in nds32_elf_relax_delete_blanks()
8793 if (irel->r_addend <= sec->size) in nds32_elf_relax_delete_blanks()
8794 irel->r_addend -= in nds32_elf_relax_delete_blanks()
8795 get_nds32_elf_blank_total (&blank_t, irel->r_addend, 1); in nds32_elf_relax_delete_blanks()
9021 nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall1() argument
9056 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longcall1()
9057 laddr = irel->r_offset; in nds32_elf_relax_longcall1()
9060 hi_irelfn = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall1()
9062 lo_irelfn = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall1()
9070 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall1()
9093 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), in nds32_elf_relax_longcall1()
9095 irel->r_addend = hi_irelfn->r_addend; in nds32_elf_relax_longcall1()
9099 bfd_putb32 (insn, contents + irel->r_offset); in nds32_elf_relax_longcall1()
9110 bfd_putb16 (insn16, contents + irel->r_offset + *insn_len); in nds32_elf_relax_longcall1()
9123 nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall2() argument
9143 laddr = irel->r_offset; in nds32_elf_relax_longcall2()
9145 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall2()
9152 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall2()
9184 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall2()
9191 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (i1_irelfn->r_info), in nds32_elf_relax_longcall2()
9193 irel->r_addend = i1_irelfn->r_addend; in nds32_elf_relax_longcall2()
9195 bfd_putb32 (insn, contents + irel->r_offset); in nds32_elf_relax_longcall2()
9204 nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall3() argument
9244 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longcall3()
9245 laddr = irel->r_offset; in nds32_elf_relax_longcall3()
9249 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall3()
9252 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall3()
9259 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall3()
9279 bfd_putb32 (insn, contents + irel->r_offset); in nds32_elf_relax_longcall3()
9282 irel->r_info = in nds32_elf_relax_longcall3()
9290 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall3()
9302 bfd_putb16 (insn16, contents + irel->r_offset + *insn_len); in nds32_elf_relax_longcall3()
9321 irel->r_info = in nds32_elf_relax_longcall3()
9322 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_LONGCALL2); in nds32_elf_relax_longcall3()
9330 bfd_putb16 (insn16, contents + irel->r_offset + *insn_len); in nds32_elf_relax_longcall3()
9343 nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump1() argument
9379 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longjump1()
9380 laddr = irel->r_offset; in nds32_elf_relax_longjump1()
9382 insn16_on = IS_16BIT_ON (irel->r_addend); in nds32_elf_relax_longjump1()
9385 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump1()
9388 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump1()
9394 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump1()
9413 bfd_putb16 (insn16, contents + irel->r_offset); in nds32_elf_relax_longjump1()
9415 irel->r_info = in nds32_elf_relax_longjump1()
9416 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longjump1()
9423 bfd_putb32 (insn, contents + irel->r_offset); in nds32_elf_relax_longjump1()
9425 irel->r_info = in nds32_elf_relax_longjump1()
9426 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_INSN16); in nds32_elf_relax_longjump1()
9427 irel->r_addend = 0; in nds32_elf_relax_longjump1()
9438 bfd_putb16 (insn16, contents + irel->r_offset + *insn_len); in nds32_elf_relax_longjump1()
9538 nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump2() argument
9578 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longjump2()
9579 laddr = irel->r_offset; in nds32_elf_relax_longjump2()
9584 find_relocs_at_address_addr (irel, internal_relocs, in nds32_elf_relax_longjump2()
9591 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump2()
9601 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump2()
9634 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump2()
9642 bfd_putb16 (re_insn16, contents + irel->r_offset); in nds32_elf_relax_longjump2()
9653 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump2()
9663 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump2()
9672 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (i2_irelfn->r_info), reloc); in nds32_elf_relax_longjump2()
9673 irel->r_addend = i2_irelfn->r_addend; in nds32_elf_relax_longjump2()
9682 bfd_putb16 (insn16, contents + irel->r_offset + 4); in nds32_elf_relax_longjump2()
9698 nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump3() argument
9761 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longjump3()
9762 laddr = irel->r_offset; in nds32_elf_relax_longjump3()
9765 convertible = IS_1ST_CONVERT (irel->r_addend); in nds32_elf_relax_longjump3()
9774 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump3()
9777 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump3()
9784 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump3()
9794 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump3()
9834 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump3()
9844 bfd_putb16 (re_insn16, contents + irel->r_offset); in nds32_elf_relax_longjump3()
9856 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump3()
9867 bfd_putb32 (re_insn, contents + irel->r_offset); in nds32_elf_relax_longjump3()
9909 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), reloc); in nds32_elf_relax_longjump3()
9910 irel->r_addend = hi_irelfn->r_addend; in nds32_elf_relax_longjump3()
9920 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), reloc); in nds32_elf_relax_longjump3()
9921 irel->r_addend = irel->r_addend; in nds32_elf_relax_longjump3()
9929 bfd_putb16 (insn16, contents + irel->r_offset + *insn_len); in nds32_elf_relax_longjump3()
9945 nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall4() argument
9963 laddr = irel->r_offset; in nds32_elf_relax_longcall4()
9968 hi_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall4()
9975 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall4()
9997 ptr_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall4()
9998 R_NDS32_PTR_RESOLVED, irel->r_addend); in nds32_elf_relax_longcall4()
9999 em_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall4()
10000 R_NDS32_EMPTY, irel->r_addend); in nds32_elf_relax_longcall4()
10006 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall4()
10010 insn = bfd_getb32 (contents + irel->r_addend); in nds32_elf_relax_longcall4()
10023 irel->r_info = in nds32_elf_relax_longcall4()
10024 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longcall4()
10027 call_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall4()
10036 insn_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall4()
10037 R_NDS32_INSN16, irel->r_addend); in nds32_elf_relax_longcall4()
10040 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longcall4()
10048 nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall5() argument
10065 laddr = irel->r_offset; in nds32_elf_relax_longcall5()
10072 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall5()
10073 R_NDS32_25_PCREL_RELA, irel->r_addend); in nds32_elf_relax_longcall5()
10078 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall5()
10113 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longcall5()
10115 cond_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall5()
10126 nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longcall6() argument
10145 laddr = irel->r_offset; in nds32_elf_relax_longcall6()
10150 em_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10151 R_NDS32_EMPTY, irel->r_addend); in nds32_elf_relax_longcall6()
10157 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall6()
10170 insn = bfd_getb32 (contents + irel->r_addend); in nds32_elf_relax_longcall6()
10190 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10191 R_NDS32_PTR_RESOLVED, irel->r_addend); in nds32_elf_relax_longcall6()
10196 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall6()
10203 irel->r_info = in nds32_elf_relax_longcall6()
10204 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longcall6()
10207 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10214 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10215 R_NDS32_INSN16, irel->r_addend); in nds32_elf_relax_longcall6()
10235 irel->r_info = in nds32_elf_relax_longcall6()
10236 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_LONGCALL5); in nds32_elf_relax_longcall6()
10240 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10241 R_NDS32_PTR_RESOLVED, irel->r_addend); in nds32_elf_relax_longcall6()
10246 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longcall6()
10252 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longcall6()
10253 R_NDS32_INSN16, irel->r_addend); in nds32_elf_relax_longcall6()
10264 nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump4() argument
10282 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_longjump4()
10283 laddr = irel->r_offset; in nds32_elf_relax_longjump4()
10290 hi_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump4()
10297 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump4()
10311 ptr_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump4()
10312 R_NDS32_PTR_RESOLVED, irel->r_addend); in nds32_elf_relax_longjump4()
10313 em_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump4()
10314 R_NDS32_EMPTY, irel->r_addend); in nds32_elf_relax_longjump4()
10320 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump4()
10333 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longjump4()
10336 call_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump4()
10351 nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump5() argument
10382 laddr = irel->r_offset; in nds32_elf_relax_longjump5()
10389 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump5()
10390 R_NDS32_25_PCREL_RELA, irel->r_addend); in nds32_elf_relax_longjump5()
10395 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump5()
10447 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longjump5()
10450 cond_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump5()
10477 nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump6() argument
10513 laddr = irel->r_offset; in nds32_elf_relax_longjump6()
10518 em_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump6()
10519 R_NDS32_EMPTY, irel->r_addend); in nds32_elf_relax_longjump6()
10525 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump6()
10599 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump6()
10605 insn_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump6()
10606 R_NDS32_INSN16, irel->r_offset); in nds32_elf_relax_longjump6()
10611 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump6()
10622 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longjump6()
10627 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump6()
10649 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), in nds32_elf_relax_longjump6()
10659 nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_longjump7() argument
10683 laddr = irel->r_offset; in nds32_elf_relax_longjump7()
10690 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump7()
10691 R_NDS32_15_PCREL_RELA, irel->r_addend); in nds32_elf_relax_longjump7()
10696 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_longjump7()
10723 insn = bfd_getb32 (contents + irel->r_addend); in nds32_elf_relax_longjump7()
10737 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_longjump7()
10738 insn_irel = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_longjump7()
10739 R_NDS32_INSN16, irel->r_offset); in nds32_elf_relax_longjump7()
10764 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_loadstore() argument
10784 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_loadstore()
10785 laddr = irel->r_offset; in nds32_elf_relax_loadstore()
10791 hi_irelfn = find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_loadstore()
10801 "reloc at 0x%lx.", abfd, (long) irel->r_offset); in nds32_elf_relax_loadstore()
10805 range_type = GET_LOADSTORE_RANGE (irel->r_addend); in nds32_elf_relax_loadstore()
10893 + irel->r_offset + hi_irelfn->r_addend; in nds32_elf_relax_loadstore()
10922 irel->r_info = in nds32_elf_relax_loadstore()
10923 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_loadstore()
10933 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_lo12() argument
10951 laddr = irel->r_offset; in nds32_elf_relax_lo12()
10957 access_addr = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_elf_relax_lo12()
10959 if (ELF32_R_SYM (irel->r_info) >= symtab_hdr->sh_info) in nds32_elf_relax_lo12()
10961 indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in nds32_elf_relax_lo12()
10969 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), reloc); in nds32_elf_relax_lo12()
10982 switch (ELF32_R_TYPE (irel->r_info)) in nds32_elf_relax_lo12()
11020 if (!turn_insn_to_sda_access (insn, ELF32_R_TYPE (irel->r_info), in nds32_elf_relax_lo12()
11023 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), reloc); in nds32_elf_relax_lo12()
11026 irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_lo12()
11042 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_piclo12() argument
11053 laddr = irel->r_offset; in nds32_elf_relax_piclo12()
11059 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_GOT_LO12) in nds32_elf_relax_piclo12()
11061 foff = calculate_got_memory_address (abfd, link_info, irel, in nds32_elf_relax_piclo12()
11065 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_PLT_GOTREL_LO12) in nds32_elf_relax_piclo12()
11067 foff = calculate_plt_memory_address (abfd, link_info, isymbuf, irel, in nds32_elf_relax_piclo12()
11071 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_GOTOFF_LO12) in nds32_elf_relax_piclo12()
11073 foff = calculate_memory_address (abfd, irel, isymbuf, in nds32_elf_relax_piclo12()
11077 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_GOTPC_LO12) in nds32_elf_relax_piclo12()
11080 + irel->r_offset + irel->r_addend; in nds32_elf_relax_piclo12()
11089 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), reloc); in nds32_elf_relax_piclo12()
11099 Elf_Internal_Rela *irel, in nds32_elf_relax_letlslo12() argument
11108 laddr = irel->r_offset; in nds32_elf_relax_letlslo12()
11109 foff = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_elf_relax_letlslo12()
11119 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), reloc); in nds32_elf_relax_letlslo12()
11129 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_letlsadd() argument
11145 laddr = irel->r_offset; in nds32_elf_relax_letlsadd()
11147 i1_irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_letlsadd()
11149 foff = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_elf_relax_letlsadd()
11159 irel->r_info = in nds32_elf_relax_letlsadd()
11160 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_TLS_LE_15S0); in nds32_elf_relax_letlsadd()
11175 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_letlsls() argument
11188 laddr = irel->r_offset; in nds32_elf_relax_letlsls()
11190 i1_irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_letlsls()
11192 foff = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_elf_relax_letlsls()
11207 irel->r_info = in nds32_elf_relax_letlsls()
11208 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_TLS_LE_15S0); in nds32_elf_relax_letlsls()
11221 irel->r_info = in nds32_elf_relax_letlsls()
11222 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_TLS_LE_15S1); in nds32_elf_relax_letlsls()
11234 irel->r_info = in nds32_elf_relax_letlsls()
11235 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_TLS_LE_15S2); in nds32_elf_relax_letlsls()
11257 nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_ptr() argument
11266 find_relocs_at_address_addr (irel, internal_relocs, irelend, in nds32_elf_relax_ptr()
11267 R_NDS32_PTR_RESOLVED, irel->r_addend); in nds32_elf_relax_ptr()
11273 abfd, (long) irel->r_offset); in nds32_elf_relax_ptr()
11282 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_ptr()
11287 count_irel = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_ptr()
11289 ptr_irel = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_ptr()
11301 *seq_len = nds32_elf_insn_size (abfd, contents, irel->r_offset); in nds32_elf_relax_ptr()
11310 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_pltgot_suff() argument
11321 laddr = irel->r_offset; in nds32_elf_relax_pltgot_suff()
11332 (irel, internal_relocs, irelend, R_NDS32_PLT_GOT_SUFF)) in nds32_elf_relax_pltgot_suff()
11336 find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_pltgot_suff()
11353 (abfd, link_info, isymbuf, irel, in nds32_elf_relax_pltgot_suff()
11361 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), in nds32_elf_relax_pltgot_suff()
11371 calculate_plt_offset (abfd, sec, link_info, isymbuf, irel, symtab_hdr); in nds32_elf_relax_pltgot_suff()
11377 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_25_PLTREL); in nds32_elf_relax_pltgot_suff()
11395 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_got_suff() argument
11406 laddr = irel->r_offset; in nds32_elf_relax_got_suff()
11412 (irel, internal_relocs, irelend, R_NDS32_GOT_SUFF)) in nds32_elf_relax_got_suff()
11415 i1_irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_got_suff()
11420 foff = calculate_got_memory_address (abfd, link_info, irel, in nds32_elf_relax_got_suff()
11427 irel->r_info = in nds32_elf_relax_got_suff()
11428 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_GOT17S2_RELA); in nds32_elf_relax_got_suff()
11442 asection *sec, Elf_Internal_Rela *irel, in nds32_elf_relax_gotoff_suff() argument
11454 laddr = irel->r_offset; in nds32_elf_relax_gotoff_suff()
11461 (irel, internal_relocs, irelend, R_NDS32_GOTOFF_SUFF)) in nds32_elf_relax_gotoff_suff()
11464 i1_irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_gotoff_suff()
11468 foff = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_elf_relax_gotoff_suff()
11482 irel->r_info = in nds32_elf_relax_gotoff_suff()
11483 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA17S2_RELA); in nds32_elf_relax_gotoff_suff()
11487 irel->r_info = in nds32_elf_relax_gotoff_suff()
11488 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA17S2_RELA); in nds32_elf_relax_gotoff_suff()
11493 irel->r_info = in nds32_elf_relax_gotoff_suff()
11494 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA18S1_RELA); in nds32_elf_relax_gotoff_suff()
11498 irel->r_info = in nds32_elf_relax_gotoff_suff()
11499 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA18S1_RELA); in nds32_elf_relax_gotoff_suff()
11503 irel->r_info = in nds32_elf_relax_gotoff_suff()
11504 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA18S1_RELA); in nds32_elf_relax_gotoff_suff()
11509 irel->r_info = in nds32_elf_relax_gotoff_suff()
11510 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA19S0_RELA); in nds32_elf_relax_gotoff_suff()
11514 irel->r_info = in nds32_elf_relax_gotoff_suff()
11515 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA19S0_RELA); in nds32_elf_relax_gotoff_suff()
11519 irel->r_info = in nds32_elf_relax_gotoff_suff()
11520 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA19S0_RELA); in nds32_elf_relax_gotoff_suff()
11524 irel->r_info = in nds32_elf_relax_gotoff_suff()
11525 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_SDA19S0_RELA); in nds32_elf_relax_gotoff_suff()
11537 if ((i2_irelfn = find_relocs_at_address (irel, internal_relocs, irelend, in nds32_elf_relax_gotoff_suff()
11539 i2_irelfn->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_elf_relax_gotoff_suff()
11561 Elf_Internal_Rela *insn_rel = NULL, *label_rel = NULL, *irel; in nds32_relax_adjust_label() local
11656 for (irel = internal_relocs; irel < irelend; irel++) in nds32_relax_adjust_label()
11658 if (ELF32_R_TYPE (irel->r_info) != R_NDS32_INSN16 in nds32_relax_adjust_label()
11659 && ELF32_R_TYPE (irel->r_info) != R_NDS32_LABEL) in nds32_relax_adjust_label()
11662 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_INSN16) in nds32_relax_adjust_label()
11666 (abfd, sec, irel, internal_relocs, irelend, &insn16) in nds32_relax_adjust_label()
11667 || is_16bit_NOP (abfd, sec, irel)) in nds32_relax_adjust_label()
11693 insn_rel = irel; in nds32_relax_adjust_label()
11696 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), in nds32_relax_adjust_label()
11699 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL) in nds32_relax_adjust_label()
11706 insn16 = bfd_getb16 (contents + irel->r_offset); in nds32_relax_adjust_label()
11707 if ((irel->r_addend & 0x1f) < 2 && (!optimize || (insn16 & 0x8000))) in nds32_relax_adjust_label()
11709 irel->r_info = in nds32_relax_adjust_label()
11710 ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); in nds32_relax_adjust_label()
11715 irel->r_offset - get_nds32_elf_blank_total (relax_blank_list, in nds32_relax_adjust_label()
11716 irel->r_offset, 1); in nds32_relax_adjust_label()
11721 if (irel->r_addend == 2 && address & 0x2) in nds32_relax_adjust_label()
11728 if ((irel->r_addend & 0x1f) < 2) in nds32_relax_adjust_label()
11737 for (tmp_rel = irel; in nds32_relax_adjust_label()
11738 tmp_rel < irelend && tmp_rel->r_offset == irel->r_offset; in nds32_relax_adjust_label()
11753 if (force_relax || irel->r_addend == 1 || address & 0x2) in nds32_relax_adjust_label()
11917 Elf_Internal_Rela *irel; in nds32_elf_relax_section() local
12023 irel = find_relocs_at_address (internal_relocs, internal_relocs, in nds32_elf_relax_section()
12026 if (irel == irelend) in nds32_elf_relax_section()
12029 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY) in nds32_elf_relax_section()
12031 if (irel->r_addend & R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG) in nds32_elf_relax_section()
12034 if (irel->r_addend & R_NDS32_RELAX_ENTRY_OPTIMIZE_FLAG) in nds32_elf_relax_section()
12037 if (irel->r_addend & R_NDS32_RELAX_ENTRY_OPTIMIZE_FOR_SPACE_FLAG) in nds32_elf_relax_section()
12050 for (irel = internal_relocs; irel < irelend; irel++) in nds32_elf_relax_section()
12057 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_relax_section()
12058 && (irel->r_addend & 0x1f) >= 2) in nds32_elf_relax_section()
12069 if (ELF32_R_TYPE (irel->r_info) >= R_NDS32_LONGCALL1 in nds32_elf_relax_section()
12070 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_LOADSTORE) in nds32_elf_relax_section()
12071 seq_len = GET_SEQ_LEN (irel->r_addend); in nds32_elf_relax_section()
12081 else if (ELF32_R_TYPE (irel->r_info) >= R_NDS32_LONGCALL4 in nds32_elf_relax_section()
12082 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_LONGJUMP7) in nds32_elf_relax_section()
12101 else if ((ELF32_R_TYPE (irel->r_info) <= R_NDS32_LO12S0_RELA in nds32_elf_relax_section()
12102 && ELF32_R_TYPE (irel->r_info) >= R_NDS32_LO12S2_RELA) in nds32_elf_relax_section()
12103 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S2_SP_RELA in nds32_elf_relax_section()
12104 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S2_DP_RELA in nds32_elf_relax_section()
12105 || ELF32_R_TYPE (irel->r_info) == R_NDS32_GOT_LO12 in nds32_elf_relax_section()
12106 || ELF32_R_TYPE (irel->r_info) == R_NDS32_GOTOFF_LO12 in nds32_elf_relax_section()
12107 || ELF32_R_TYPE (irel->r_info) == R_NDS32_GOTPC_LO12 in nds32_elf_relax_section()
12108 || ELF32_R_TYPE (irel->r_info) == R_NDS32_PLTREL_LO12 in nds32_elf_relax_section()
12109 || ELF32_R_TYPE (irel->r_info) == R_NDS32_PLT_GOTREL_LO12 in nds32_elf_relax_section()
12110 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_GOT_SUFF in nds32_elf_relax_section()
12111 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_PTR) in nds32_elf_relax_section()
12112 || ELF32_R_TYPE (irel->r_info) == R_NDS32_17IFC_PCREL_RELA in nds32_elf_relax_section()
12113 || ELF32_R_TYPE (irel->r_info) == R_NDS32_TLS_LE_LO12 in nds32_elf_relax_section()
12114 || ELF32_R_TYPE (irel->r_info) == R_NDS32_TLS_LE_ADD in nds32_elf_relax_section()
12115 || ELF32_R_TYPE (irel->r_info) == R_NDS32_TLS_LE_LS) in nds32_elf_relax_section()
12123 switch (ELF32_R_TYPE (irel->r_info)) in nds32_elf_relax_section()
12126 removed = nds32_elf_relax_longcall1 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12131 removed = nds32_elf_relax_longcall2 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12136 removed = nds32_elf_relax_longcall3 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12141 removed = nds32_elf_relax_longjump1 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12146 removed = nds32_elf_relax_longjump2 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12151 removed = nds32_elf_relax_longjump3 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12156 removed = nds32_elf_relax_longcall4 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12161 removed = nds32_elf_relax_longcall5 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12166 removed = nds32_elf_relax_longcall6 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12171 removed = nds32_elf_relax_longjump4 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12176 removed = nds32_elf_relax_longjump5 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12181 removed = nds32_elf_relax_longjump6 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12186 removed = nds32_elf_relax_longjump7 (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12191 removed = nds32_elf_relax_loadstore (link_info, abfd, sec, irel, in nds32_elf_relax_section()
12202 nds32_elf_relax_lo12 (link_info, abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12213 nds32_elf_relax_piclo12 (link_info, abfd, sec, irel, contents, in nds32_elf_relax_section()
12220 nds32_elf_relax_letlslo12 (link_info, abfd, irel, contents, in nds32_elf_relax_section()
12226 nds32_elf_relax_letlsadd (link_info, abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12231 nds32_elf_relax_letlsls (link_info, abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12235 removed = nds32_elf_relax_ptr (abfd, sec, irel, internal_relocs, in nds32_elf_relax_section()
12239 nds32_elf_relax_pltgot_suff (link_info, abfd, sec, irel, in nds32_elf_relax_section()
12245 nds32_elf_relax_got_suff (link_info, abfd, sec, irel, in nds32_elf_relax_section()
12251 nds32_elf_relax_gotoff_suff (link_info, abfd, sec, irel, in nds32_elf_relax_section()
12263 (&relax_blank_list, irel->r_offset + insn_len, in nds32_elf_relax_section()
12703 Elf_Internal_Rela *irel; in nds32_relax_fp_as_gp() local
12740 for (irel = internal_relocs; irel < irelend; irel++) in nds32_relax_fp_as_gp()
12747 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN in nds32_relax_fp_as_gp()
12748 && (irel->r_addend & R_NDS32_RELAX_REGION_OMIT_FP_FLAG)) in nds32_relax_fp_as_gp()
12754 begin_rel = irel; in nds32_relax_fp_as_gp()
12758 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END in nds32_relax_fp_as_gp()
12759 && (irel->r_addend & R_NDS32_RELAX_REGION_OMIT_FP_FLAG)) in nds32_relax_fp_as_gp()
12788 irel->r_addend |= R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG; in nds32_relax_fp_as_gp()
12789 irel->r_addend &= ~R_NDS32_RELAX_REGION_OMIT_FP_FLAG; in nds32_relax_fp_as_gp()
12813 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_SDA15S2_RELA in nds32_relax_fp_as_gp()
12814 || ELF32_R_TYPE (irel->r_info) == R_NDS32_SDA17S2_RELA) in nds32_relax_fp_as_gp()
12822 insn = bfd_getb32 (contents + irel->r_offset); in nds32_relax_fp_as_gp()
12826 addr = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); in nds32_relax_fp_as_gp()
12827 nds32_fag_insert (&fag_head, addr, irel); in nds32_relax_fp_as_gp()
12829 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_SDA_FP7U2_RELA) in nds32_relax_fp_as_gp()
12833 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_17IFC_PCREL_RELA in nds32_relax_fp_as_gp()
12834 || ELF32_R_TYPE (irel->r_info) == R_NDS32_10IFCU_PCREL_RELA) in nds32_relax_fp_as_gp()
12851 Elf_Internal_Rela *irel; in nds32_fag_remove_unused_fpbase() local
12869 for (irel = internal_relocs; irel < irelend; irel++) in nds32_fag_remove_unused_fpbase()
12879 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN in nds32_fag_remove_unused_fpbase()
12880 && (irel->r_addend & R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG)) in nds32_fag_remove_unused_fpbase()
12882 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END in nds32_fag_remove_unused_fpbase()
12883 && (irel->r_addend & R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG)) in nds32_fag_remove_unused_fpbase()
12891 syndx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; in nds32_fag_remove_unused_fpbase()
12892 if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info) in nds32_fag_remove_unused_fpbase()
12900 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_SDA19S0_RELA) in nds32_fag_remove_unused_fpbase()
12903 insn = bfd_getb32 (contents + irel->r_offset); in nds32_fag_remove_unused_fpbase()
12907 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_SDA15S0_RELA) in nds32_fag_remove_unused_fpbase()
12910 insn = bfd_getb32 (contents + irel->r_offset); in nds32_fag_remove_unused_fpbase()
12914 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_20_RELA) in nds32_fag_remove_unused_fpbase()
12917 insn = bfd_getb32 (contents + irel->r_offset); in nds32_fag_remove_unused_fpbase()
12926 (&relax_blank_list, irel->r_offset, 4)) in nds32_fag_remove_unused_fpbase()
13095 Elf_Internal_Rela *irel; member
13111 Elf_Internal_Rela *irel, in nds32_elf_ifc_insert_symbol() argument
13120 && ELF32_R_SYM (ptr->irel_head->irel->r_info) == ELF32_R_SYM (irel->r_info) in nds32_elf_ifc_insert_symbol()
13121 && ptr->irel_head->irel->r_addend == irel->r_addend) in nds32_elf_ifc_insert_symbol()
13133 irel_list->irel = irel; in nds32_elf_ifc_insert_symbol()
13162 ptr->irel_head->irel = irel; in nds32_elf_ifc_insert_symbol()
13194 Elf_Internal_Rela *irel; in nds32_elf_ifc_calc() local
13210 irel = find_relocs_at_address (internal_relocs, internal_relocs, irelend, in nds32_elf_ifc_calc()
13213 if (irel == NULL in nds32_elf_ifc_calc()
13214 || irel >= irelend in nds32_elf_ifc_calc()
13215 || ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_ENTRY in nds32_elf_ifc_calc()
13216 || (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY in nds32_elf_ifc_calc()
13217 && !(irel->r_addend & R_NDS32_RELAX_ENTRY_IFC_FLAG))) in nds32_elf_ifc_calc()
13225 while (irel != NULL && irel < irelend) in nds32_elf_ifc_calc()
13229 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN) in nds32_elf_ifc_calc()
13232 && (irel->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG) != 0) in nds32_elf_ifc_calc()
13236 while (irel != NULL in nds32_elf_ifc_calc()
13237 && irel < irelend in nds32_elf_ifc_calc()
13238 && (ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_REGION_END in nds32_elf_ifc_calc()
13239 || (irel->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG) != 0)) in nds32_elf_ifc_calc()
13240 irel++; in nds32_elf_ifc_calc()
13244 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_25_PCREL_RELA) in nds32_elf_ifc_calc()
13246 insn = bfd_getb32 (contents + irel->r_offset); in nds32_elf_ifc_calc()
13247 nds32_elf_get_insn_with_reg (irel, insn, &insn_with_reg); in nds32_elf_ifc_calc()
13248 r_symndx = ELF32_R_SYM (irel->r_info); in nds32_elf_ifc_calc()
13252 nds32_elf_ifc_insert_symbol (sec, NULL, irel, insn_with_reg); in nds32_elf_ifc_calc()
13258 nds32_elf_ifc_insert_symbol (sec, h, irel, insn_with_reg); in nds32_elf_ifc_calc()
13261 irel++; in nds32_elf_ifc_calc()
13290 if ((irel_ptr->next->irel->r_offset in nds32_elf_ifc_filter()
13291 - irel_keeper->irel->r_offset) > 1022) in nds32_elf_ifc_filter()
13308 address = (irel_ptr->irel->r_offset in nds32_elf_ifc_filter()
13389 if (ELF32_R_TYPE (irel_ptr->irel->r_info) == R_NDS32_TRAN) in nds32_elf_ifc_filter_after_ex9()
13436 Elf_Internal_Rela *irel; in nds32_elf_ifc_replace() local
13471 irel = irel_ptr->irel; in nds32_elf_ifc_replace()
13473 && irel < irel_ptr->next->irel) in nds32_elf_ifc_replace()
13474 || (irel_ptr->next->keep == 1 && irel < irelend)) in nds32_elf_ifc_replace()
13475 && !(ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_ifc_replace()
13476 && (irel->r_addend & 0x1f) == 2)) in nds32_elf_ifc_replace()
13477 irel++; in nds32_elf_ifc_replace()
13478 if (irel >= irelend in nds32_elf_ifc_replace()
13479 || !(ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_ifc_replace()
13480 && (irel->r_addend & 0x1f) == 2 in nds32_elf_ifc_replace()
13481 && ((irel->r_offset - get_nds32_elf_blank_total in nds32_elf_ifc_replace()
13482 (&relax_blank_list, irel->r_offset, 1)) in nds32_elf_ifc_replace()
13486 bfd_putb16 (insn16, contents + irel_ptr->irel->r_offset); in nds32_elf_ifc_replace()
13488 (&relax_blank_list, irel_ptr->irel->r_offset + 2, 2)) in nds32_elf_ifc_replace()
13490 irel_ptr->irel->r_info = in nds32_elf_ifc_replace()
13491 ELF32_R_INFO (ELF32_R_SYM (irel_ptr->irel->r_info), in nds32_elf_ifc_replace()
13523 irel = irel_ptr->irel; in nds32_elf_ifc_replace()
13526 && irel < irel_ptr->next->irel) in nds32_elf_ifc_replace()
13529 && irel < irelend)) in nds32_elf_ifc_replace()
13530 && !(ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_ifc_replace()
13531 && (irel->r_addend & 0x1f) == 2)) in nds32_elf_ifc_replace()
13532 irel++; in nds32_elf_ifc_replace()
13533 if (irel >= irelend in nds32_elf_ifc_replace()
13534 || !(ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL in nds32_elf_ifc_replace()
13535 && (irel->r_addend & 0x1f) == 2 in nds32_elf_ifc_replace()
13536 && ((irel->r_offset in nds32_elf_ifc_replace()
13538 irel->r_offset, 1)) & 0x02) == 0)) in nds32_elf_ifc_replace()
13541 bfd_putb16 (insn16, contents + irel_ptr->irel->r_offset); in nds32_elf_ifc_replace()
13543 (&relax_blank_list, irel_ptr->irel->r_offset + 2, 2)) in nds32_elf_ifc_replace()
13550 irel_ptr->irel->r_info = in nds32_elf_ifc_replace()
13551 ELF32_R_INFO (ELF32_R_SYM (irel_ptr->irel->r_info), in nds32_elf_ifc_replace()
13612 && ELF32_R_TYPE (irel_ptr->irel->r_info) == R_NDS32_10IFCU_PCREL_RELA) in nds32_elf_ifc_reloc()
13614 relocation = irel_keeper->irel->r_offset; in nds32_elf_ifc_reloc()
13615 relocation = relocation - irel_ptr->irel->r_offset; in nds32_elf_ifc_reloc()
13621 relocation = irel_keeper->irel->r_offset; in nds32_elf_ifc_reloc()
13622 relocation = relocation - irel_ptr->irel->r_offset; in nds32_elf_ifc_reloc()
13633 relocation = irel_keeper->irel->r_offset; in nds32_elf_ifc_reloc()
13634 relocation = relocation - irel_ptr->irel->r_offset; in nds32_elf_ifc_reloc()
13643 irel_ptr->irel->r_info = in nds32_elf_ifc_reloc()
13644 ELF32_R_INFO (ELF32_R_SYM (irel_ptr->irel->r_info), in nds32_elf_ifc_reloc()
13647 bfd_putb16 (insn16, contents + irel_ptr->irel->r_offset); in nds32_elf_ifc_reloc()
13658 && ELF32_R_TYPE (irel_ptr->irel->r_info) == R_NDS32_10IFCU_PCREL_RELA) in nds32_elf_ifc_reloc()
13661 relocation = (irel_keeper->irel->r_offset in nds32_elf_ifc_reloc()
13664 address = (irel_ptr->irel->r_offset in nds32_elf_ifc_reloc()
13675 relocation = (irel_keeper->irel->r_offset in nds32_elf_ifc_reloc()
13691 relocation = (irel_keeper->irel->r_offset in nds32_elf_ifc_reloc()
13707 bfd_putb16 (insn16, contents + irel_ptr->irel->r_offset); in nds32_elf_ifc_reloc()
13708 irel_ptr->irel->r_info = in nds32_elf_ifc_reloc()
13709 ELF32_R_INFO (ELF32_R_SYM (irel_ptr->irel->r_info), in nds32_elf_ifc_reloc()
13739 Elf_Internal_Rela *irel; member
13756 Elf_Internal_Rela *irel; member
13769 Elf_Internal_Rela *irel; member
13785 Elf_Internal_Rela *irel; member
13792 Elf_Internal_Rela *irel; member
13832 ret->irel = NULL; in nds32_elf_code_hash_newfunc()
13906 ptr->irel = h->irel; in nds32_elf_examine_insn_times()
13931 ptr->irel = m_list->irel; in nds32_elf_examine_insn_times()
13947 ptr->irel = NULL; in nds32_elf_examine_insn_times()
13976 ptr->irel = h->irel; in nds32_elf_count_insn_times()
14006 relocation += m_list->irel->r_addend; in nds32_elf_count_insn_times()
14034 ptr->irel = h->m_list->irel; in nds32_elf_count_insn_times()
14052 ptr->irel = h->m_list->irel; in nds32_elf_count_insn_times()
14070 ptr->irel = NULL; in nds32_elf_count_insn_times()
14188 nds32_elf_get_insn_with_reg (Elf_Internal_Rela *irel, in nds32_elf_get_insn_with_reg() argument
14193 if (irel == NULL in nds32_elf_get_insn_with_reg()
14194 || (ELF32_R_TYPE (irel->r_info) >= (int) ARRAY_SIZE (nds32_elf_howto_table) in nds32_elf_get_insn_with_reg()
14195 && (ELF32_R_TYPE (irel->r_info) - R_NDS32_RELAX_ENTRY) in nds32_elf_get_insn_with_reg()
14202 howto = bfd_elf32_bfd_reloc_type_table_lookup (ELF32_R_TYPE (irel->r_info)); in nds32_elf_get_insn_with_reg()
14209 nds32_elf_irel_mask (Elf_Internal_Rela *irel) in nds32_elf_irel_mask() argument
14213 if (irel == NULL in nds32_elf_irel_mask()
14214 || (ELF32_R_TYPE (irel->r_info) >= (int) ARRAY_SIZE (nds32_elf_howto_table) in nds32_elf_irel_mask()
14215 && (ELF32_R_TYPE (irel->r_info) - R_NDS32_RELAX_ENTRY) in nds32_elf_irel_mask()
14219 howto = bfd_elf32_bfd_reloc_type_table_lookup (ELF32_R_TYPE (irel->r_info)); in nds32_elf_irel_mask()
14240 nds32_elf_ex9_insert_fix (asection * sec, Elf_Internal_Rela * irel, in nds32_elf_ex9_insert_fix() argument
14247 ptr->irel = irel; in nds32_elf_ex9_insert_fix()
14275 Elf_Internal_Rela **irel, in nds32_elf_ex9_relocation_check() argument
14293 while ((*irel) != NULL && (*irel) < irelend && *off == (*irel)->r_offset) in nds32_elf_ex9_relocation_check()
14295 switch (ELF32_R_TYPE ((*irel)->r_info)) in nds32_elf_ex9_relocation_check()
14301 if (((*irel)->r_addend & R_NDS32_RELAX_REGION_NO_EX9_FLAG) in nds32_elf_ex9_relocation_check()
14303 && ((*irel)->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG))) in nds32_elf_ex9_relocation_check()
14309 nested_ex9 = ((*irel)->r_addend & R_NDS32_RELAX_REGION_NO_EX9_FLAG); in nds32_elf_ex9_relocation_check()
14311 && ((*irel)->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG)); in nds32_elf_ex9_relocation_check()
14312 while ((*irel) && (*irel) < irelend && (nested_ex9 || nested_loop)) in nds32_elf_ex9_relocation_check()
14314 (*irel)++; in nds32_elf_ex9_relocation_check()
14315 if (ELF32_R_TYPE ((*irel)->r_info) == R_NDS32_RELAX_REGION_BEGIN) in nds32_elf_ex9_relocation_check()
14318 if (((*irel)->r_addend & R_NDS32_RELAX_REGION_NO_EX9_FLAG) != 0) in nds32_elf_ex9_relocation_check()
14321 && ((*irel)->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG)) in nds32_elf_ex9_relocation_check()
14324 else if (ELF32_R_TYPE ((*irel)->r_info) == R_NDS32_RELAX_REGION_END) in nds32_elf_ex9_relocation_check()
14327 if (((*irel)->r_addend & R_NDS32_RELAX_REGION_NO_EX9_FLAG) != 0) in nds32_elf_ex9_relocation_check()
14330 && ((*irel)->r_addend & R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG)) in nds32_elf_ex9_relocation_check()
14333 else if (ELF32_R_TYPE ((*irel)->r_info) == R_NDS32_LABEL in nds32_elf_ex9_relocation_check()
14334 && ((*irel)->r_addend & 0x1f) == 2) in nds32_elf_ex9_relocation_check()
14338 if (((*irel)->r_offset - in nds32_elf_ex9_relocation_check()
14340 (*irel)->r_offset, 0)) & 0x02) in nds32_elf_ex9_relocation_check()
14344 if ((*irel) >= irelend) in nds32_elf_ex9_relocation_check()
14347 *off = (*irel)->r_offset; in nds32_elf_ex9_relocation_check()
14356 if (((*irel)->r_addend & 0x1f) == 2) in nds32_elf_ex9_relocation_check()
14360 if (((*irel)->r_offset - in nds32_elf_ex9_relocation_check()
14362 (*irel)->r_offset, 0)) & 0x02) in nds32_elf_ex9_relocation_check()
14380 if ((*irel)->r_addend == 1) in nds32_elf_ex9_relocation_check()
14381 result |= ((*irel)->r_addend << 25) ; in nds32_elf_ex9_relocation_check()
14383 result |= ((*irel)->r_addend << 24) ; in nds32_elf_ex9_relocation_check()
14411 irel_save = *irel; in nds32_elf_ex9_relocation_check()
14415 if (ELF32_R_TYPE ((*irel)->r_info) < ARRAY_SIZE (nds32_elf_howto_table) in nds32_elf_ex9_relocation_check()
14416 && ELF32_R_TYPE ((*irel)->r_info) != R_NDS32_NONE in nds32_elf_ex9_relocation_check()
14417 && ELF32_R_TYPE ((*irel)->r_info) != R_NDS32_INSN16) in nds32_elf_ex9_relocation_check()
14436 if ((*irel) < irelend in nds32_elf_ex9_relocation_check()
14437 && ((*irel) + 1) < irelend in nds32_elf_ex9_relocation_check()
14438 && (*irel)->r_offset == ((*irel) + 1)->r_offset) in nds32_elf_ex9_relocation_check()
14441 (*irel)++; in nds32_elf_ex9_relocation_check()
14445 *irel = irel_save; in nds32_elf_ex9_relocation_check()
14487 Elf_Internal_Rela *irel; in nds32_elf_ex9_replace_instruction() local
14516 irel = find_relocs_at_address (internal_relocs, internal_relocs, in nds32_elf_ex9_replace_instruction()
14520 if (irel == NULL in nds32_elf_ex9_replace_instruction()
14521 || irel >= irelend in nds32_elf_ex9_replace_instruction()
14522 || ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_ENTRY in nds32_elf_ex9_replace_instruction()
14523 || (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY in nds32_elf_ex9_replace_instruction()
14524 && !(irel->r_addend & R_NDS32_RELAX_ENTRY_EX9_FLAG))) in nds32_elf_ex9_replace_instruction()
14527 irel = internal_relocs; in nds32_elf_ex9_replace_instruction()
14536 while (irel != NULL && irel < irelend && irel->r_offset < off) in nds32_elf_ex9_replace_instruction()
14537 irel++; in nds32_elf_ex9_replace_instruction()
14539 data_flag = nds32_elf_ex9_relocation_check (info, &irel, irelend, in nds32_elf_ex9_replace_instruction()
14579 if (irel != NULL && irel < irelend && irel->r_offset == off) in nds32_elf_ex9_replace_instruction()
14582 nds32_elf_get_insn_with_reg (irel, insn, &insn_with_reg); in nds32_elf_ex9_replace_instruction()
14584 if (ex9_insn->irel != NULL) in nds32_elf_ex9_replace_instruction()
14585 nds32_elf_get_insn_with_reg (ex9_insn->irel, it_insn, in nds32_elf_ex9_replace_instruction()
14588 if (ex9_insn->irel != NULL in nds32_elf_ex9_replace_instruction()
14589 && (ELF32_R_TYPE (irel->r_info) == in nds32_elf_ex9_replace_instruction()
14590 ELF32_R_TYPE (ex9_insn->irel->r_info)) in nds32_elf_ex9_replace_instruction()
14595 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_25_PCREL_RELA in nds32_elf_ex9_replace_instruction()
14596 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S0_ORI_RELA in nds32_elf_ex9_replace_instruction()
14597 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S0_RELA in nds32_elf_ex9_replace_instruction()
14598 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S1_RELA in nds32_elf_ex9_replace_instruction()
14599 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S2_RELA in nds32_elf_ex9_replace_instruction()
14600 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3 in nds32_elf_ex9_replace_instruction()
14601 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0) in nds32_elf_ex9_replace_instruction()
14602 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3_RELA in nds32_elf_ex9_replace_instruction()
14603 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0_RELA) in nds32_elf_ex9_replace_instruction()
14604 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA12S2_DP_RELA in nds32_elf_ex9_replace_instruction()
14605 && ELF32_R_TYPE (irel->r_info) <= in nds32_elf_ex9_replace_instruction()
14607 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA16S3_RELA in nds32_elf_ex9_replace_instruction()
14608 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA19S0_RELA)) in nds32_elf_ex9_replace_instruction()
14610 r_symndx = ELF32_R_SYM (irel->r_info); in nds32_elf_ex9_replace_instruction()
14618 && ex9_insn->irel->r_addend == irel->r_addend in nds32_elf_ex9_replace_instruction()
14619 && ex9_insn->irel->r_info == irel->r_info) in nds32_elf_ex9_replace_instruction()
14635 && (ex9_insn->m_list->irel->r_addend == in nds32_elf_ex9_replace_instruction()
14636 irel->r_addend)) in nds32_elf_ex9_replace_instruction()
14647 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_HI20_RELA) in nds32_elf_ex9_replace_instruction()
14649 r_symndx = ELF32_R_SYM (irel->r_info); in nds32_elf_ex9_replace_instruction()
14657 && ex9_insn->irel->r_addend == irel->r_addend in nds32_elf_ex9_replace_instruction()
14658 && ex9_insn->irel->r_info == irel->r_info) in nds32_elf_ex9_replace_instruction()
14679 && (m_list->irel->r_addend in nds32_elf_ex9_replace_instruction()
14680 == irel->r_addend)) in nds32_elf_ex9_replace_instruction()
14689 nds32_elf_ex9_insert_fix (sec, irel, in nds32_elf_ex9_replace_instruction()
14705 && ELF32_R_TYPE (irel->r_info) == R_NDS32_25_PCREL_RELA) in nds32_elf_ex9_replace_instruction()
14707 nds32_elf_get_insn_with_reg (irel, it_insn, &it_insn_with_reg); in nds32_elf_ex9_replace_instruction()
14713 r_symndx = ELF32_R_SYM (irel->r_info); in nds32_elf_ex9_replace_instruction()
14728 relocation += irel->r_addend; in nds32_elf_ex9_replace_instruction()
14741 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN in nds32_elf_ex9_replace_instruction()
14742 || ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END in nds32_elf_ex9_replace_instruction()
14743 || ELF32_R_TYPE (irel->r_info) == R_NDS32_NONE) in nds32_elf_ex9_replace_instruction()
14747 if (insn == it_insn && ex9_insn->irel == NULL) in nds32_elf_ex9_replace_instruction()
14755 if (insn == it_insn && ex9_insn->irel == NULL) in nds32_elf_ex9_replace_instruction()
14781 irel_ptr->irel = irel; in nds32_elf_ex9_replace_instruction()
14813 irel_ptr->irel->r_info = in nds32_elf_ex9_replace_instruction()
14814 ELF32_R_INFO (ELF32_R_SYM (irel_ptr->irel->r_info), R_NDS32_TRAN); in nds32_elf_ex9_replace_instruction()
14923 relocation += ptr->m_list->irel->r_addend; in nds32_elf_ex9_reloc_insn()
14935 Elf_Internal_Rela irel_backup = *(ptr->irel); in nds32_elf_ex9_reloc_insn()
14941 isym = isym + ELF32_R_SYM (ptr->irel->r_info); in nds32_elf_ex9_reloc_insn()
14959 &ptr->sec, ptr->irel); in nds32_elf_ex9_reloc_insn()
14960 if (ptr->irel != NULL) in nds32_elf_ex9_reloc_insn()
14961 relocation += ptr->irel->r_addend; in nds32_elf_ex9_reloc_insn()
14965 *(ptr->irel) = irel_backup; in nds32_elf_ex9_reloc_insn()
15013 ptr->irel = NULL; in nds32_elf_ex9_import_table()
15176 relocation += m_list->irel->r_addend; in nds32_elf_ex9_reloc_jmp()
15221 relocation += fix_ptr->irel->r_addend; in nds32_elf_ex9_reloc_jmp()
15244 bfd_putb16 (insn_ex9, source_contents + fix_ptr->irel->r_offset); in nds32_elf_ex9_reloc_jmp()
15299 Elf_Internal_Rela *irel; in nds32_elf_ex9_build_hash_table() local
15329 irel = find_relocs_at_address (internal_relocs, internal_relocs, irelend, in nds32_elf_ex9_build_hash_table()
15333 if (irel == NULL in nds32_elf_ex9_build_hash_table()
15334 || irel >= irelend in nds32_elf_ex9_build_hash_table()
15335 || ELF32_R_TYPE (irel->r_info) != R_NDS32_RELAX_ENTRY in nds32_elf_ex9_build_hash_table()
15336 || (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY in nds32_elf_ex9_build_hash_table()
15337 && !(irel->r_addend & R_NDS32_RELAX_ENTRY_EX9_FLAG))) in nds32_elf_ex9_build_hash_table()
15340 irel = internal_relocs; in nds32_elf_ex9_build_hash_table()
15348 while (irel != NULL && irel < irelend && irel->r_offset < off) in nds32_elf_ex9_build_hash_table()
15349 irel++; in nds32_elf_ex9_build_hash_table()
15351 data_flag = nds32_elf_ex9_relocation_check (link_info, &irel, irelend, in nds32_elf_ex9_build_hash_table()
15375 if (irel != NULL && irel < irelend && irel->r_offset == off) in nds32_elf_ex9_build_hash_table()
15377 nds32_elf_get_insn_with_reg (irel, insn, &insn_with_reg); in nds32_elf_ex9_build_hash_table()
15378 howto = bfd_elf32_bfd_reloc_type_table_lookup (ELF32_R_TYPE (irel->r_info)); in nds32_elf_ex9_build_hash_table()
15381 if (ELF32_R_TYPE (irel->r_info) == R_NDS32_25_PCREL_RELA in nds32_elf_ex9_build_hash_table()
15382 || ELF32_R_TYPE (irel->r_info) == R_NDS32_HI20_RELA in nds32_elf_ex9_build_hash_table()
15383 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S0_ORI_RELA in nds32_elf_ex9_build_hash_table()
15384 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S0_RELA in nds32_elf_ex9_build_hash_table()
15385 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S1_RELA in nds32_elf_ex9_build_hash_table()
15386 || ELF32_R_TYPE (irel->r_info) == R_NDS32_LO12S2_RELA in nds32_elf_ex9_build_hash_table()
15387 ||(ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3 in nds32_elf_ex9_build_hash_table()
15388 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0) in nds32_elf_ex9_build_hash_table()
15389 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3_RELA in nds32_elf_ex9_build_hash_table()
15390 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0_RELA) in nds32_elf_ex9_build_hash_table()
15391 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA12S2_DP_RELA in nds32_elf_ex9_build_hash_table()
15392 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA12S2_SP_RELA) in nds32_elf_ex9_build_hash_table()
15393 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA16S3_RELA in nds32_elf_ex9_build_hash_table()
15394 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA19S0_RELA)) in nds32_elf_ex9_build_hash_table()
15396 r_symndx = ELF32_R_SYM (irel->r_info); in nds32_elf_ex9_build_hash_table()
15397 jrel = irel; in nds32_elf_ex9_build_hash_table()
15398 rel_backup = *irel; in nds32_elf_ex9_build_hash_table()
15407 + st_value + irel->r_addend); in nds32_elf_ex9_build_hash_table()
15418 RELOC_FOR_GLOBAL_SYMBOL (link_info, abfd, sec, irel, in nds32_elf_ex9_build_hash_table()
15422 relocation += irel->r_addend; in nds32_elf_ex9_build_hash_table()
15433 if ((ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3 in nds32_elf_ex9_build_hash_table()
15434 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0) in nds32_elf_ex9_build_hash_table()
15435 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA15S3_RELA in nds32_elf_ex9_build_hash_table()
15436 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA15S0_RELA) in nds32_elf_ex9_build_hash_table()
15437 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA12S2_DP_RELA in nds32_elf_ex9_build_hash_table()
15438 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA12S2_SP_RELA) in nds32_elf_ex9_build_hash_table()
15439 || (ELF32_R_TYPE (irel->r_info) >= R_NDS32_SDA16S3_RELA in nds32_elf_ex9_build_hash_table()
15440 && ELF32_R_TYPE (irel->r_info) <= R_NDS32_SDA19S0_RELA)) in nds32_elf_ex9_build_hash_table()
15464 bfd_get_filename (abfd), irel->r_offset, in nds32_elf_ex9_build_hash_table()
15465 irel->r_info, irel->r_addend, relocation, align); in nds32_elf_ex9_build_hash_table()
15472 | ((relocation >> shift) & nds32_elf_irel_mask (irel)); in nds32_elf_ex9_build_hash_table()
15474 else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN in nds32_elf_ex9_build_hash_table()
15475 || ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END in nds32_elf_ex9_build_hash_table()
15476 || ELF32_R_TYPE (irel->r_info) == R_NDS32_NONE) in nds32_elf_ex9_build_hash_table()
15517 m_list_new->irel = jrel; in nds32_elf_ex9_build_hash_table()
15539 m_list->irel = jrel; in nds32_elf_ex9_build_hash_table()
15570 m_list_new->irel = jrel; in nds32_elf_ex9_build_hash_table()
15596 entry->irel = jrel; in nds32_elf_ex9_build_hash_table()