00001 /* 00002 * Copyright 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. 00003 */ 00004 00005 /* Internal format of XCOFF object file data structures for BFD. 00006 00007 Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 00008 Free Software Foundation, Inc. 00009 Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support. 00010 00011 This file is part of BFD, the Binary File Descriptor library. 00012 00013 This program is free software; you can redistribute it and/or modify 00014 it under the terms of the GNU General Public License as published by 00015 the Free Software Foundation; either version 2 of the License, or 00016 (at your option) any later version. 00017 00018 This program is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with this program; if not, write to the Free Software 00025 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00026 00027 #ifndef _INTERNAL_XCOFF_H 00028 #define _INTERNAL_XCOFF_H 00029 00030 /* Linker */ 00031 00032 /* Names of "special" sections. */ 00033 #define _TEXT ".text" 00034 #define _DATA ".data" 00035 #define _BSS ".bss" 00036 #define _PAD ".pad" 00037 #define _LOADER ".loader" 00038 #define _EXCEPT ".except" 00039 #define _TYPCHK ".typchk" 00040 00041 /* XCOFF uses a special .loader section with type STYP_LOADER. */ 00042 #define STYP_LOADER 0x1000 00043 00044 /* XCOFF uses a special .debug section with type STYP_DEBUG. */ 00045 #define STYP_DEBUG 0x2000 00046 00047 /* XCOFF handles line number or relocation overflow by creating 00048 another section header with STYP_OVRFLO set. */ 00049 #define STYP_OVRFLO 0x8000 00050 00051 /* Specifies an exception section. A section of this type provides 00052 information to identify the reason that a trap or ececptin occured within 00053 and executable object program */ 00054 #define STYP_EXCEPT 0x0100 00055 00056 /* Specifies a type check section. A section of this type contains parameter 00057 argument type check strings used by the AIX binder. */ 00058 #define STYP_TYPCHK 0x4000 00059 00060 #define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */ 00061 #define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */ 00062 #define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */ 00063 00064 /* XCOFF relocation types. 00065 The relocations are described in the function 00066 xcoff[64]_ppc_relocate_section in coff64-rs6000.c and coff-rs6000.c */ 00067 00068 #define R_POS (0x00) 00069 #define R_NEG (0x01) 00070 #define R_REL (0x02) 00071 #define R_TOC (0x03) 00072 #define R_RTB (0x04) 00073 #define R_GL (0x05) 00074 #define R_TCL (0x06) 00075 #define R_BA (0x08) 00076 #define R_BR (0x0a) 00077 #define R_RL (0x0c) 00078 #define R_RLA (0x0d) 00079 #define R_REF (0x0f) 00080 #define R_TRL (0x12) 00081 #define R_TRLA (0x13) 00082 #define R_RRTBI (0x14) 00083 #define R_RRTBA (0x15) 00084 #define R_CAI (0x16) 00085 #define R_CREL (0x17) 00086 #define R_RBA (0x18) 00087 #define R_RBAC (0x19) 00088 #define R_RBR (0x1a) 00089 #define R_RBRC (0x1b) 00090 00091 /* Storage class #defines, from /usr/include/storclass.h that are not already 00092 defined in internal.h */ 00093 00094 /* Comment string in .info section */ 00095 #define C_INFO 110 00096 00097 /* Auxillary Symbol Entries */ 00098 00099 /* x_smtyp values: */ 00100 #define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ 00101 #define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ 00102 /* Symbol type values: */ 00103 #define XTY_ER 0 /* External reference */ 00104 #define XTY_SD 1 /* Csect definition */ 00105 #define XTY_LD 2 /* Label definition */ 00106 #define XTY_CM 3 /* .BSS */ 00107 #define XTY_EM 4 /* Error message */ 00108 #define XTY_US 5 /* "Reserved for internal use" */ 00109 00110 /* x_smclas values: */ 00111 #define XMC_PR 0 /* Read-only program code */ 00112 #define XMC_RO 1 /* Read-only constant */ 00113 #define XMC_DB 2 /* Read-only debug dictionary table */ 00114 #define XMC_TC 3 /* Read-write general TOC entry */ 00115 #define XMC_UA 4 /* Read-write unclassified */ 00116 #define XMC_RW 5 /* Read-write data */ 00117 #define XMC_GL 6 /* Read-only global linkage */ 00118 #define XMC_XO 7 /* Read-only extended operation */ 00119 #define XMC_SV 8 /* Read-only supervisor call */ 00120 #define XMC_BS 9 /* Read-write BSS */ 00121 #define XMC_DS 10 /* Read-write descriptor csect */ 00122 #define XMC_UC 11 /* Read-write unnamed Fortran common */ 00123 #define XMC_TI 12 /* Read-only traceback index csect */ 00124 #define XMC_TB 13 /* Read-only traceback table csect */ 00125 /* 14 ??? */ 00126 #define XMC_TC0 15 /* Read-write TOC anchor */ 00127 #define XMC_TD 16 /* Read-write data in TOC */ 00128 #define XMC_SV64 17 /* Read-only 64 bit supervisor call */ 00129 #define XMC_SV3264 18 /* Read-only 32 or 64 bit supervisor call */ 00130 00131 /* The ldhdr structure. This appears at the start of the .loader 00132 section. */ 00133 00134 struct internal_ldhdr 00135 { 00136 /* The version number: 00137 1 : 32 bit 00138 2 : 64 bit */ 00139 unsigned long l_version; 00140 00141 /* The number of symbol table entries. */ 00142 bfd_size_type l_nsyms; 00143 00144 /* The number of relocation table entries. */ 00145 bfd_size_type l_nreloc; 00146 00147 /* The length of the import file string table. */ 00148 bfd_size_type l_istlen; 00149 00150 /* The number of import files. */ 00151 bfd_size_type l_nimpid; 00152 00153 /* The offset from the start of the .loader section to the first 00154 entry in the import file table. */ 00155 bfd_size_type l_impoff; 00156 00157 /* The length of the string table. */ 00158 bfd_size_type l_stlen; 00159 00160 /* The offset from the start of the .loader section to the first 00161 entry in the string table. */ 00162 bfd_size_type l_stoff; 00163 00164 /* The offset to start of the symbol table, only in XCOFF64 */ 00165 bfd_vma l_symoff; 00166 00167 /* The offset to the start of the relocation table, only in XCOFF64 */ 00168 bfd_vma l_rldoff; 00169 }; 00170 00171 /* The ldsym structure. This is used to represent a symbol in the 00172 .loader section. */ 00173 00174 struct internal_ldsym 00175 { 00176 union 00177 { 00178 /* The symbol name if <= SYMNMLEN characters. */ 00179 char _l_name[SYMNMLEN]; 00180 struct 00181 { 00182 /* Zero if the symbol name is more than SYMNMLEN characters. */ 00183 long _l_zeroes; 00184 00185 /* The offset in the string table if the symbol name is more 00186 than SYMNMLEN characters. */ 00187 long _l_offset; 00188 } 00189 _l_l; 00190 } 00191 _l; 00192 00193 /* The symbol value. */ 00194 bfd_vma l_value; 00195 00196 /* The symbol section number. */ 00197 short l_scnum; 00198 00199 /* The symbol type and flags. */ 00200 char l_smtype; 00201 00202 /* The symbol storage class. */ 00203 char l_smclas; 00204 00205 /* The import file ID. */ 00206 bfd_size_type l_ifile; 00207 00208 /* Offset to the parameter type check string. */ 00209 bfd_size_type l_parm; 00210 }; 00211 00212 /* These flags are for the l_smtype field (the lower three bits are an 00213 XTY_* value). */ 00214 00215 /* Imported symbol. */ 00216 #define L_IMPORT (0x40) 00217 /* Entry point. */ 00218 #define L_ENTRY (0x20) 00219 /* Exported symbol. */ 00220 #define L_EXPORT (0x10) 00221 00222 /* The ldrel structure. This is used to represent a reloc in the 00223 .loader section. */ 00224 00225 struct internal_ldrel 00226 { 00227 /* The reloc address. */ 00228 bfd_vma l_vaddr; 00229 00230 /* The symbol table index in the .loader section symbol table. */ 00231 bfd_size_type l_symndx; 00232 00233 /* The relocation type and size. */ 00234 short l_rtype; 00235 00236 /* The section number this relocation applies to. */ 00237 short l_rsecnm; 00238 }; 00239 00240 /* An entry in the XCOFF linker hash table. */ 00241 struct xcoff_link_hash_entry 00242 { 00243 struct bfd_link_hash_entry root; 00244 00245 /* Symbol index in output file. Set to -1 initially. Set to -2 if 00246 there is a reloc against this symbol. */ 00247 long indx; 00248 00249 /* If we have created a TOC entry for this symbol, this is the .tc 00250 section which holds it. */ 00251 asection *toc_section; 00252 00253 union 00254 { 00255 /* If we have created a TOC entry (the XCOFF_SET_TOC flag is 00256 set), this is the offset in toc_section. */ 00257 bfd_vma toc_offset; 00258 00259 /* If the TOC entry comes from an input file, this is set to the 00260 symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */ 00261 long toc_indx; 00262 } 00263 u; 00264 00265 /* If this symbol is a function entry point which is called, this 00266 field holds a pointer to the function descriptor. If this symbol 00267 is a function descriptor, this field holds a pointer to the 00268 function entry point. */ 00269 struct xcoff_link_hash_entry *descriptor; 00270 00271 /* The .loader symbol table entry, if there is one. */ 00272 struct internal_ldsym *ldsym; 00273 00274 /* If XCOFF_BUILT_LDSYM is set, this is the .loader symbol table 00275 index. If XCOFF_BUILD_LDSYM is clear, and XCOFF_IMPORT is set, 00276 this is the l_ifile value. */ 00277 long ldindx; 00278 00279 /* Some linker flags. */ 00280 unsigned long flags; 00281 00282 /* The storage mapping class. */ 00283 unsigned char smclas; 00284 }; 00285 00286 /* Flags for xcoff_link_hash_entry. */ 00287 00288 /* Symbol is referenced by a regular object. */ 00289 #define XCOFF_REF_REGULAR 0x00000001 00290 /* Symbol is defined by a regular object. */ 00291 #define XCOFF_DEF_REGULAR 0x00000002 00292 /* Symbol is defined by a dynamic object. */ 00293 #define XCOFF_DEF_DYNAMIC 0x00000004 00294 /* Symbol is used in a reloc being copied into the .loader section. */ 00295 #define XCOFF_LDREL 0x00000008 00296 /* Symbol is the entry point. */ 00297 #define XCOFF_ENTRY 0x00000010 00298 /* Symbol is called; this is, it appears in a R_BR reloc. */ 00299 #define XCOFF_CALLED 0x00000020 00300 /* Symbol needs the TOC entry filled in. */ 00301 #define XCOFF_SET_TOC 0x00000040 00302 /* Symbol is explicitly imported. */ 00303 #define XCOFF_IMPORT 0x00000080 00304 /* Symbol is explicitly exported. */ 00305 #define XCOFF_EXPORT 0x00000100 00306 /* Symbol has been processed by xcoff_build_ldsyms. */ 00307 #define XCOFF_BUILT_LDSYM 0x00000200 00308 /* Symbol is mentioned by a section which was not garbage collected. */ 00309 #define XCOFF_MARK 0x00000400 00310 /* Symbol size is recorded in size_list list from hash table. */ 00311 #define XCOFF_HAS_SIZE 0x00000800 00312 /* Symbol is a function descriptor. */ 00313 #define XCOFF_DESCRIPTOR 0x00001000 00314 /* Multiple definitions have been for the symbol. */ 00315 #define XCOFF_MULTIPLY_DEFINED 0x00002000 00316 /* Symbol is the __rtinit symbol. */ 00317 #define XCOFF_RTINIT 0x00004000 00318 /* Symbol is an imported 32 bit syscall. */ 00319 #define XCOFF_SYSCALL32 0x00008000 00320 /* Symbol is an imported 64 bit syscall. */ 00321 #define XCOFF_SYSCALL64 0x00010000 00322 00323 /* The XCOFF linker hash table. */ 00324 00325 #define XCOFF_NUMBER_OF_SPECIAL_SECTIONS 6 00326 #define XCOFF_SPECIAL_SECTION_TEXT 0 00327 #define XCOFF_SPECIAL_SECTION_ETEXT 1 00328 #define XCOFF_SPECIAL_SECTION_DATA 2 00329 #define XCOFF_SPECIAL_SECTION_EDATA 3 00330 #define XCOFF_SPECIAL_SECTION_END 4 00331 #define XCOFF_SPECIAL_SECTION_END2 5 00332 00333 struct xcoff_link_hash_table 00334 { 00335 struct bfd_link_hash_table root; 00336 00337 /* The .debug string hash table. We need to compute this while 00338 reading the input files, so that we know how large the .debug 00339 section will be before we assign section positions. */ 00340 struct bfd_strtab_hash *debug_strtab; 00341 00342 /* The .debug section we will use for the final output. */ 00343 asection *debug_section; 00344 00345 /* The .loader section we will use for the final output. */ 00346 asection *loader_section; 00347 00348 /* A count of non TOC relative relocs which will need to be 00349 allocated in the .loader section. */ 00350 size_t ldrel_count; 00351 00352 /* The .loader section header. */ 00353 struct internal_ldhdr ldhdr; 00354 00355 /* The .gl section we use to hold global linkage code. */ 00356 asection *linkage_section; 00357 00358 /* The .tc section we use to hold toc entries we build for global 00359 linkage code. */ 00360 asection *toc_section; 00361 00362 /* The .ds section we use to hold function descriptors which we 00363 create for exported symbols. */ 00364 asection *descriptor_section; 00365 00366 /* The list of import files. */ 00367 struct xcoff_import_file *imports; 00368 00369 /* Required alignment of sections within the output file. */ 00370 unsigned long file_align; 00371 00372 /* Whether the .text section must be read-only. */ 00373 bfd_boolean textro; 00374 00375 /* Whether garbage collection was done. */ 00376 bfd_boolean gc; 00377 00378 /* A linked list of symbols for which we have size information. */ 00379 struct xcoff_link_size_list 00380 { 00381 struct xcoff_link_size_list *next; 00382 struct xcoff_link_hash_entry *h; 00383 bfd_size_type size; 00384 } 00385 *size_list; 00386 00387 /* Magic sections: _text, _etext, _data, _edata, _end, end. */ 00388 asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS]; 00389 }; 00390 00391 00392 /* This structure is used to pass information through 00393 xcoff_link_hash_traverse. */ 00394 00395 struct xcoff_loader_info 00396 { 00397 /* Set if a problem occurred. */ 00398 bfd_boolean failed; 00399 00400 /* Output BFD. */ 00401 bfd *output_bfd; 00402 00403 /* Link information structure. */ 00404 struct bfd_link_info *info; 00405 00406 /* Whether all defined symbols should be exported. */ 00407 bfd_boolean export_defineds; 00408 00409 /* Number of ldsym structures. */ 00410 size_t ldsym_count; 00411 00412 /* Size of string table. */ 00413 size_t string_size; 00414 00415 /* String table. */ 00416 char *strings; 00417 00418 /* Allocated size of string table. */ 00419 size_t string_alc; 00420 }; 00421 00422 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value 00423 from smaller values. Start with zero, widen, *then* decrement. */ 00424 #define MINUS_ONE (((bfd_vma) 0) - 1) 00425 00426 /* __rtinit, from /usr/include/rtinit.h. */ 00427 struct __rtinit 00428 { 00429 /* Pointer to runtime linker. 00430 XXX: Is the parameter really void? */ 00431 int (*rtl) (void); 00432 00433 /* Offset to array of init functions, 0 if none. */ 00434 int init_offset; 00435 00436 /* Offset to array of fini functions, 0 if none. */ 00437 int fini_offset; 00438 00439 /* Size of __RTINIT_DESCRIPTOR. This value should be used instead of 00440 sizeof(__RTINIT_DESCRIPTOR). */ 00441 int __rtinit_descriptor_size; 00442 }; 00443 00444 #define RTINIT_DESCRIPTOR_SIZE (12) 00445 00446 struct __rtinit_descriptor 00447 { 00448 /* Init/fini function. */ 00449 int f; 00450 00451 /* Offset, relative to the start of the __rtinit symbol, to name of the 00452 function. */ 00453 00454 int name_offset; 00455 00456 /* Flags */ 00457 unsigned char flags; 00458 }; 00459 00460 /* Archive */ 00461 00462 #define XCOFFARMAG "<aiaff>\012" 00463 #define XCOFFARMAGBIG "<bigaf>\012" 00464 #define SXCOFFARMAG 8 00465 00466 /* The size of the ascii archive elements */ 00467 #define XCOFFARMAG_ELEMENT_SIZE 12 00468 #define XCOFFARMAGBIG_ELEMENT_SIZE 20 00469 00470 /* This terminates an XCOFF archive member name. */ 00471 00472 #define XCOFFARFMAG "`\012" 00473 #define SXCOFFARFMAG 2 00474 00475 /* XCOFF archives start with this (printable) structure. */ 00476 00477 struct xcoff_ar_file_hdr 00478 { 00479 /* Magic string. */ 00480 char magic[SXCOFFARMAG]; 00481 00482 /* Offset of the member table (decimal ASCII string). */ 00483 char memoff[XCOFFARMAG_ELEMENT_SIZE]; 00484 00485 /* Offset of the global symbol table (decimal ASCII string). */ 00486 char symoff[XCOFFARMAG_ELEMENT_SIZE]; 00487 00488 /* Offset of the first member in the archive (decimal ASCII string). */ 00489 char firstmemoff[XCOFFARMAG_ELEMENT_SIZE]; 00490 00491 /* Offset of the last member in the archive (decimal ASCII string). */ 00492 char lastmemoff[XCOFFARMAG_ELEMENT_SIZE]; 00493 00494 /* Offset of the first member on the free list (decimal ASCII 00495 string). */ 00496 char freeoff[XCOFFARMAG_ELEMENT_SIZE]; 00497 }; 00498 00499 #define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE) 00500 00501 /* This is the equivalent data structure for the big archive format. */ 00502 00503 struct xcoff_ar_file_hdr_big 00504 { 00505 /* Magic string. */ 00506 char magic[SXCOFFARMAG]; 00507 00508 /* Offset of the member table (decimal ASCII string). */ 00509 char memoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00510 00511 /* Offset of the global symbol table for 32-bit objects (decimal ASCII 00512 string). */ 00513 char symoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00514 00515 /* Offset of the global symbol table for 64-bit objects (decimal ASCII 00516 string). */ 00517 char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE]; 00518 00519 /* Offset of the first member in the archive (decimal ASCII string). */ 00520 char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00521 00522 /* Offset of the last member in the archive (decimal ASCII string). */ 00523 char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00524 00525 /* Offset of the first member on the free list (decimal ASCII 00526 string). */ 00527 char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00528 }; 00529 00530 #define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE) 00531 00532 /* Each XCOFF archive member starts with this (printable) structure. */ 00533 00534 struct xcoff_ar_hdr 00535 { 00536 /* File size not including the header (decimal ASCII string). */ 00537 char size[XCOFFARMAG_ELEMENT_SIZE]; 00538 00539 /* File offset of next archive member (decimal ASCII string). */ 00540 char nextoff[XCOFFARMAG_ELEMENT_SIZE]; 00541 00542 /* File offset of previous archive member (decimal ASCII string). */ 00543 char prevoff[XCOFFARMAG_ELEMENT_SIZE]; 00544 00545 /* File mtime (decimal ASCII string). */ 00546 char date[12]; 00547 00548 /* File UID (decimal ASCII string). */ 00549 char uid[12]; 00550 00551 /* File GID (decimal ASCII string). */ 00552 char gid[12]; 00553 00554 /* File mode (octal ASCII string). */ 00555 char mode[12]; 00556 00557 /* Length of file name (decimal ASCII string). */ 00558 char namlen[4]; 00559 00560 /* This structure is followed by the file name. The length of the 00561 name is given in the namlen field. If the length of the name is 00562 odd, the name is followed by a null byte. The name and optional 00563 null byte are followed by XCOFFARFMAG, which is not included in 00564 namlen. The contents of the archive member follow; the number of 00565 bytes is given in the size field. */ 00566 }; 00567 00568 #define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4) 00569 00570 /* The equivalent for the big archive format. */ 00571 00572 struct xcoff_ar_hdr_big 00573 { 00574 /* File size not including the header (decimal ASCII string). */ 00575 char size[XCOFFARMAGBIG_ELEMENT_SIZE]; 00576 00577 /* File offset of next archive member (decimal ASCII string). */ 00578 char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00579 00580 /* File offset of previous archive member (decimal ASCII string). */ 00581 char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE]; 00582 00583 /* File mtime (decimal ASCII string). */ 00584 char date[12]; 00585 00586 /* File UID (decimal ASCII string). */ 00587 char uid[12]; 00588 00589 /* File GID (decimal ASCII string). */ 00590 char gid[12]; 00591 00592 /* File mode (octal ASCII string). */ 00593 char mode[12]; 00594 00595 /* Length of file name (decimal ASCII string). */ 00596 char namlen[4]; 00597 00598 /* This structure is followed by the file name. The length of the 00599 name is given in the namlen field. If the length of the name is 00600 odd, the name is followed by a null byte. The name and optional 00601 null byte are followed by XCOFFARFMAG, which is not included in 00602 namlen. The contents of the archive member follow; the number of 00603 bytes is given in the size field. */ 00604 }; 00605 00606 #define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4) 00607 00608 /* We often have to distinguish between the old and big file format. 00609 Make it a bit cleaner. We can use `xcoff_ardata' here because the 00610 `hdr' member has the same size and position in both formats. 00611 <bigaf> is the default format, return TRUE even when xcoff_ardata is 00612 NULL. */ 00613 #ifndef SMALL_ARCHIVE 00614 /* Creates big archives by default */ 00615 #define xcoff_big_format_p(abfd) \ 00616 ((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \ 00617 ((NULL != bfd_ardata (abfd)) && \ 00618 (NULL != xcoff_ardata (abfd)) && \ 00619 (xcoff_ardata (abfd)->magic[1] == 'b'))) 00620 #else 00621 /* Creates small archives by default. */ 00622 #define xcoff_big_format_p(abfd) \ 00623 (((NULL != bfd_ardata (abfd)) && \ 00624 (NULL != xcoff_ardata (abfd)) && \ 00625 (xcoff_ardata (abfd)->magic[1] == 'b'))) 00626 #endif 00627 00628 /* We store a copy of the xcoff_ar_file_hdr in the tdata field of the 00629 artdata structure. Similar for the big archive. */ 00630 #define xcoff_ardata(abfd) \ 00631 ((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata) 00632 #define xcoff_ardata_big(abfd) \ 00633 ((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata) 00634 00635 /* We store a copy of the xcoff_ar_hdr in the arelt_data field of an 00636 archive element. Similar for the big archive. */ 00637 #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) 00638 #define arch_xhdr(bfd) \ 00639 ((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header) 00640 #define arch_xhdr_big(bfd) \ 00641 ((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header) 00642 00643 #endif /* _INTERNAL_XCOFF_H */
1.5.6