Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 #ifndef targ_em_elf_INCLUDED 00037 #define targ_em_elf_INCLUDED 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 00043 struct section_info { 00044 Elf_Scn *scnptr; /* ptr to the elf section. */ 00045 char *buffer; /* data buffer for section. */ 00046 Elf64_Xword limit; /* maximum size of data buffer. */ 00047 Elf64_Xword size; /* current size of data buffer. */ 00048 Elf64_Xword offset; /* current offset in data buffer. */ 00049 Elf64_Word align; /* alignment of the section. */ 00050 Elf64_Word scnidx; /* symbol index of the section symbol. */ 00051 pSCNINFO relinfo; /* associated REL section. */ 00052 pSCNINFO relainfo; /* associated RELA section. */ 00053 pSCNINFO events; /* associated EVENTS section. */ 00054 Elf64_Word ev_offset; /* offset of last entry in events scn. */ 00055 pSCNINFO contents; /* associated CONTENTS section. */ 00056 Elf64_Word con_offset; /* offset of last entry in contents scn. */ 00057 }; 00058 00059 #define SCNINFO_scnptr(t) ((t)->scnptr) 00060 #define SCNINFO_buffer(t) ((t)->buffer) 00061 #define SCNINFO_limit(t) ((t)->limit) 00062 #define SCNINFO_size(t) ((t)->size) 00063 #define SCNINFO_offset(t) ((t)->offset) 00064 #define SCNINFO_align(t) ((t)->align) 00065 #define SCNINFO_scnidx(t) ((t)->scnidx) 00066 #define SCNINFO_relinfo(t) ((t)->relinfo) 00067 #define SCNINFO_relainfo(t) ((t)->relainfo) 00068 #define SCNINFO_events(t) ((t)->events) 00069 #define SCNINFO_ev_offset(t) ((t)->ev_offset) 00070 #define SCNINFO_contents(t) ((t)->contents) 00071 #define SCNINFO_con_offset(t) ((t)->con_offset) 00072 00073 #define SCNINFO_index(t) (elf_ndxscn(SCNINFO_scnptr(t))) 00074 extern char *Get_Section_Name (pSCNINFO scninfo); 00075 extern void Generate_Addr_Reset (pSCNINFO scn, BOOL is_events, Elf64_Xword ev_ofst); 00076 extern void Set_Current_Location (pSCNINFO scn, BOOL is_events, Elf64_Word ev_ofst); 00077 extern pSCNINFO Interface_Scn; 00078 00079 /* this defines the common, other than name and enum value, 00080 * parts of code for both IA-64 and Mips 00081 */ 00082 00083 /* 00084 * relocations that are the same other than the enum 00085 */ 00086 #define R_WORD32 (Big_Endian ? R_IA_64_DIR32MSB : R_IA_64_DIR32LSB) 00087 #define R_WORD64 (Big_Endian ? R_IA_64_DIR64MSB : R_IA_64_DIR64LSB) 00088 #define R_SCN_DISP (Big_Endian ? R_IA_64_SECREL64MSB : R_IA_64_SECREL64LSB) 00089 #define R_PLT_OFFSET R_IA_64_PLTOFF22 00090 #define R_NONE R_IA_64_NONE 00091 00092 /* 00093 * section flags that are the same other than the enum 00094 */ 00095 #define SHF_MERGE SHF_IRIX_MERGE 00096 #define SHF_NOSTRIP SHF_MIPS_NOSTRIP 00097 00098 /* 00099 * section types that are the same other than the enum 00100 */ 00101 #define SHT_EVENTS SHT_IA64_EVENTS 00102 #define SHT_CONTENT SHT_IA64_CONTENT 00103 #define SHT_IFACE SHT_IA64_IFACE 00104 00105 /* 00106 * section names 00107 */ 00108 #define SECT_OPTIONS_NAME IA64_OPTIONS 00109 #define SECT_EVENTS_NAME IA64_EVENTS 00110 #define SECT_IFACE_NAME IA64_INTERFACES 00111 #define SECT_CONTENT_NAME MIPS_CONTENT 00112 00113 inline void 00114 Set_Elf_Version (unsigned char *e_ident) 00115 { 00116 /* temporary version until final objects */ 00117 e_ident[EI_TVERSION] = EV_T_CURRENT; 00118 } 00119 00120 #ifdef __cplusplus 00121 } 00122 #endif 00123 #endif /* targ_em_elf_INCLUDED */ 00124