⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elf-hppa.h

📁 基于4个mips核的noc设计
💻 H
📖 第 1 页 / 共 5 页
字号:
    return NULL;  /* Some reasonable defaults.  */  final_types[0] = finaltype;  final_types[1] = NULL;#define final_type finaltype[0]  final_type = base_type;  /* Just a tangle of nested switch statements to deal with the braindamage     that a different field selector means a completely different relocation     for PA ELF.  */  switch (base_type)    {    /* We have been using generic relocation types.  However, that may not       really make sense.  Anyway, we need to support both R_PARISC_DIR64       and R_PARISC_DIR32 here.  */    case R_PARISC_DIR32:    case R_PARISC_DIR64:    case R_HPPA_ABS_CALL:      switch (format)	{	case 14:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_DIR14F;	      break;	    case e_rsel:	    case e_rrsel:	    case e_rdsel:	      final_type = R_PARISC_DIR14R;	      break;	    case e_rtsel:	      final_type = R_PARISC_DLTIND14R;	      break;	    case e_rtpsel:	      final_type = R_PARISC_LTOFF_FPTR14DR;	      break;	    case e_tsel:	      final_type = R_PARISC_DLTIND14F;	      break;	    case e_rpsel:	      final_type = R_PARISC_PLABEL14R;	      break;	    default:	      return NULL;	    }	  break;	case 17:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_DIR17F;	      break;	    case e_rsel:	    case e_rrsel:	    case e_rdsel:	      final_type = R_PARISC_DIR17R;	      break;	    default:	      return NULL;	    }	  break;	case 21:	  switch (field)	    {	    case e_lsel:	    case e_lrsel:	    case e_ldsel:	    case e_nlsel:	    case e_nlrsel:	      final_type = R_PARISC_DIR21L;	      break;	    case e_ltsel:	      final_type = R_PARISC_DLTIND21L;	      break;	    case e_ltpsel:	      final_type = R_PARISC_LTOFF_FPTR21L;	      break;	    case e_lpsel:	      final_type = R_PARISC_PLABEL21L;	      break;	    default:	      return NULL;	    }	  break;	case 32:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_DIR32;	      /* When in 64bit mode, a 32bit relocation is supposed to		 be a section relative relocation.  Dwarf2 (for example)		 uses 32bit section relative relocations.  */	      if (bfd_get_arch_info (abfd)->bits_per_address != 32)	        final_type = R_PARISC_SECREL32;	      break;	    case e_psel:	      final_type = R_PARISC_PLABEL32;	      break;	    default:	      return NULL;	    }	  break;	case 64:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_DIR64;	      break;	    case e_psel:	      final_type = R_PARISC_FPTR64;	      break;	    default:	      return NULL;	    }	  break;	default:	  return NULL;	}      break;    case R_HPPA_GOTOFF:      switch (format)	{	case 14:	  switch (field)	    {	    case e_rsel:	    case e_rrsel:	    case e_rdsel:	      /* R_PARISC_DLTREL14R for elf64, R_PARISC_DPREL14R for elf32  */	      final_type = base_type + OFFSET_14R_FROM_21L;	      break;	    case e_fsel:	      /* R_PARISC_DLTREL14F for elf64, R_PARISC_DPREL14F for elf32  */	      final_type = base_type + OFFSET_14F_FROM_21L;	      break;	    default:	      return NULL;	    }	  break;	case 21:	  switch (field)	    {	    case e_lsel:	    case e_lrsel:	    case e_ldsel:	    case e_nlsel:	    case e_nlrsel:	      /* R_PARISC_DLTREL21L for elf64, R_PARISC_DPREL21L for elf32  */	      final_type = base_type;	      break;	    default:	      return NULL;	    }	  break;	default:	  return NULL;	}      break;    case R_HPPA_PCREL_CALL:      switch (format)	{	case 12:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_PCREL12F;	      break;	    default:	      return NULL;	    }	  break;	case 14:	  /* Contrary to appearances, these are not calls of any sort.	     Rather, they are loads/stores with a pcrel reloc.  */	  switch (field)	    {	    case e_rsel:	    case e_rrsel:	    case e_rdsel:	      final_type = R_PARISC_PCREL14R;	      break;	    case e_fsel:	      final_type = R_PARISC_PCREL14F;	      break;	    default:	      return NULL;	    }	  break;	case 17:	  switch (field)	    {	    case e_rsel:	    case e_rrsel:	    case e_rdsel:	      final_type = R_PARISC_PCREL17R;	      break;	    case e_fsel:	      final_type = R_PARISC_PCREL17F;	      break;	    default:	      return NULL;	    }	  break;	case 21:	  switch (field)	    {	    case e_lsel:	    case e_lrsel:	    case e_ldsel:	    case e_nlsel:	    case e_nlrsel:	      final_type = R_PARISC_PCREL21L;	      break;	    default:	      return NULL;	    }	  break;	case 22:	  switch (field)	    {	    case e_fsel:	      final_type = R_PARISC_PCREL22F;	      break;	    default:	      return NULL;	    }	  break;	default:	  return NULL;	}      break;    case R_PARISC_GNU_VTENTRY:    case R_PARISC_GNU_VTINHERIT:    case R_PARISC_SEGREL32:    case R_PARISC_SEGBASE:      /* The defaults are fine for these cases.  */      break;    default:      return NULL;    }  return final_types;}/* Translate from an elf into field into a howto relocation pointer.  */static voidelf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)     bfd *abfd ATTRIBUTE_UNUSED;     arelent *bfd_reloc;     Elf_Internal_Rela *elf_reloc;{  BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)	      < (unsigned int) R_PARISC_UNIMPLEMENTED);  bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];}/* Translate from an elf into field into a howto relocation pointer.  */static voidelf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)     bfd *abfd ATTRIBUTE_UNUSED;     arelent *bfd_reloc;     Elf_Internal_Rel *elf_reloc;{  BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)	      < (unsigned int) R_PARISC_UNIMPLEMENTED);  bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];}/* Return the address of the howto table entry to perform the CODE   relocation for an ARCH machine.  */static reloc_howto_type *elf_hppa_reloc_type_lookup (abfd, code)     bfd *abfd ATTRIBUTE_UNUSED;     bfd_reloc_code_real_type code;{  if ((int) code < (int) R_PARISC_UNIMPLEMENTED)    {      BFD_ASSERT ((int) elf_hppa_howto_table[(int) code].type == (int) code);      return &elf_hppa_howto_table[(int) code];    }  return NULL;}/* Return true if SYM represents a local label symbol.  */static booleanelf_hppa_is_local_label_name (abfd, name)     bfd *abfd ATTRIBUTE_UNUSED;     const char *name;{  if (name[0] == 'L' && name[1] == '$')    return 1;  return _bfd_elf_is_local_label_name (abfd, name);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -