diff options
author | Alan Modra <amodra@gmail.com> | 2025-08-23 16:39:51 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-08-25 08:28:38 +0930 |
commit | 5db3a9f674fd8e447f7bdfd8686f9dccf2b35ea6 (patch) | |
tree | d5f7897244756d0ae0e5c84a4cf910770ba8a30f | |
parent | 2c193469846d9b8ca6a62ae32e9b093a3dccf197 (diff) | |
download | binutils-5db3a9f674fd8e447f7bdfd8686f9dccf2b35ea6.zip binutils-5db3a9f674fd8e447f7bdfd8686f9dccf2b35ea6.tar.gz binutils-5db3a9f674fd8e447f7bdfd8686f9dccf2b35ea6.tar.bz2 |
Tidy include/coff/external.h and internal.h
Mostly whitespace fixes and wrap of long comment lines, removal of block
comments and moving a few defines around. Nothing much to see here,
but AUXESZ before union external_auxent is needed by the next patch.
* coff/external.h: Whitespace fixes, wrap long comment lines,
remove header style comments. Move some defines.
(E_FILNMLEN): Remove #ifndef.
(_ETEXT): Don't define.
(SYMENT, AUXENT): Don't define, make them typedefs.
* coff/internal.h: Whitespace fixes, wrap long comment lines,
remove header style comments. Move some defines.
(signed): Don't define.
-rw-r--r-- | include/coff/external.h | 169 | ||||
-rw-r--r-- | include/coff/internal.h | 268 |
2 files changed, 212 insertions, 225 deletions
diff --git a/include/coff/external.h b/include/coff/external.h index 772b866..91c5dac 100644 --- a/include/coff/external.h +++ b/include/coff/external.h @@ -1,17 +1,17 @@ /* external.h -- External COFF structures - + Copyright (C) 2001-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, @@ -21,41 +21,41 @@ #define COFF_EXTERNAL_H #ifndef DO_NOT_DEFINE_FILHDR -/********************** FILE HEADER **********************/ + +#define FILHDR struct external_filehdr +#define FILHSZ 20 struct external_filehdr - { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ - }; - -#define FILHDR struct external_filehdr -#define FILHSZ 20 +{ + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ +}; #endif #ifndef DO_NOT_DEFINE_AOUTHDR -/********************** AOUT "OPTIONAL HEADER" **********************/ + +#define AOUTHDRSZ 28 +#define AOUTSZ 28 typedef struct external_aouthdr - { - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ - } ATTRIBUTE_PACKED +{ + char magic[2]; /* type of file */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ + char data_start[4]; /* base of data used for this file */ +} ATTRIBUTE_PACKED AOUTHDR; -#define AOUTHDRSZ 28 -#define AOUTSZ 28 +#define AOUTHDRSZ64 24 typedef struct external_aouthdr64 { @@ -65,32 +65,30 @@ typedef struct external_aouthdr64 char dsize[4]; /* Initialized data " ". */ char bsize[4]; /* Uninitialized data " ". */ char entry[4]; /* Entry pt. */ - char text_start[4]; /* Base of text used for this file. */ + char text_start[4]; /* Base of text used for this file. */ } AOUTHDR64; -#define AOUTHDRSZ64 24 #endif /* not DO_NOT_DEFINE_AOUTHDR */ #ifndef DO_NOT_DEFINE_SCNHDR -/********************** SECTION HEADER **********************/ + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 40 struct external_scnhdr - { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries */ - char s_flags[4]; /* flags */ - }; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 +{ + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries */ + char s_flags[4]; /* flags */ +}; /* Names of "special" sections. */ @@ -103,12 +101,13 @@ struct external_scnhdr #ifndef DO_NOT_DEFINE_LINENO -/********************** LINE NUMBERS **********************/ - #ifndef L_LNNO_SIZE #error L_LNNO_SIZE needs to be defined #endif +#define LINENO struct external_lineno +#define LINESZ (4 + L_LNNO_SIZE) + /* 1 line number entry for every "breakpointable" source line in a section. Line numbers are grouped on a per function basis; first entry in a function grouping will have l_lnno = 0 and in place of physical address will be the @@ -124,9 +123,6 @@ struct external_lineno char l_lnno[L_LNNO_SIZE]; /* line number */ }; -#define LINENO struct external_lineno -#define LINESZ (4 + L_LNNO_SIZE) - #if L_LNNO_SIZE == 4 #define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno)) #define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno)) @@ -139,15 +135,11 @@ struct external_lineno #endif /* not DO_NOT_DEFINE_LINENO */ #ifndef DO_NOT_DEFINE_SYMENT -/********************** SYMBOLS **********************/ #define E_SYMNMLEN 8 /* # characters in a symbol name */ -#ifndef E_FILNMLEN -#define E_FILNMLEN 14 -#endif -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ +#define SYMESZ 18 -struct external_syment +typedef struct external_syment { union { @@ -165,10 +157,8 @@ struct external_syment char e_type[2]; char e_sclass[1]; char e_numaux[1]; -} ATTRIBUTE_PACKED ; - -#define SYMENT struct external_syment -#define SYMESZ 18 +} ATTRIBUTE_PACKED +SYMENT; #ifndef N_BTMASK #define N_BTMASK 0xf @@ -190,12 +180,16 @@ struct external_syment #ifndef DO_NOT_DEFINE_AUXENT -union external_auxent +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ +#define AUXESZ 18 + +typedef union external_auxent { struct { char x_tagndx[4]; /* str, un, or enum tag indx */ - + union { struct @@ -203,66 +197,63 @@ union external_auxent char x_lnno[2]; /* declaration line number */ char x_size[2]; /* str/union/array size */ } x_lnsz; - + char x_fsize[4]; /* size of function */ - + } x_misc; - + union { - struct /* if ISFCN, tag, or .bb */ + struct /* if ISFCN, tag, or .bb */ { char x_lnnoptr[4]; /* ptr to fcn line # */ char x_endndx[4]; /* entry ndx past block end */ } x_fcn; - - struct /* if ISARY, up to 4 dimen. */ + + struct /* if ISARY, up to 4 dimen. */ { char x_dimen[E_DIMNUM][2]; } x_ary; - + } x_fcnary; - + char x_tvndx[2]; /* tv index */ - + } x_sym; - + union { char x_fname[E_FILNMLEN]; - + struct { char x_zeroes[4]; char x_offset[4]; } x_n; - + } x_file; - + struct { char x_scnlen[4]; /* section length */ char x_nreloc[2]; /* # relocation entries */ char x_nlinno[2]; /* # line numbers */ #ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT - char x_checksum[4]; /* section COMDAT checksum */ - char x_associated[2]; /* COMDAT associated section index */ - char x_comdat[1]; /* COMDAT selection number */ -#endif + char x_checksum[4]; /* section COMDAT checksum */ + char x_associated[2]; /* COMDAT associated section index */ + char x_comdat[1]; /* COMDAT selection number */ +#endif } x_scn; - + + /* info about .tv section (in auxent of symbol .tv). */ struct { char x_tvfill[4]; /* tv fill value */ char x_tvlen[2]; /* length of .tv */ char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ -} ATTRIBUTE_PACKED ; - -#define AUXENT union external_auxent -#define AUXESZ 18 - -#define _ETEXT "etext" + } x_tv; +} ATTRIBUTE_PACKED +AUXENT; #endif /* not DO_NOT_DEFINE_AUXENT */ diff --git a/include/coff/internal.h b/include/coff/internal.h index 9532b0b..9da5e4b 100644 --- a/include/coff/internal.h +++ b/include/coff/internal.h @@ -21,15 +21,6 @@ #ifndef GNU_COFF_INTERNAL_H #define GNU_COFF_INTERNAL_H 1 -/* First, make "signed char" work, even on old compilers. */ -#ifndef signed -#ifndef __STDC__ -#define signed /**/ -#endif -#endif - -/********************** FILE HEADER **********************/ - /* extra stuff in a PE header. */ struct internal_extra_pe_filehdr @@ -55,7 +46,7 @@ struct internal_extra_pe_filehdr unsigned short e_res2[10]; /* Reserved words, all 0x0 */ bfd_vma e_lfanew; /* File address of new exe header, 0x80 */ char dos_message[64]; /* Text which always follows DOS header. */ - bfd_vma nt_signature; /* required NT signature, 0x4550 */ + bfd_vma nt_signature; /* required NT signature, 0x4550 */ }; struct internal_filehdr @@ -75,27 +66,27 @@ struct internal_filehdr /* Bits for f_flags: - F_RELFLG relocation info stripped from file - F_EXEC file is executable (no unresolved external references) - F_LNNO line numbers stripped from file - F_LSYMS local symbols stripped from file - F_AR16WR file is 16-bit little-endian - F_AR32WR file is 32-bit little-endian - F_AR32W file is 32-bit big-endian - F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports - F_SHROBJ rs/6000 aix: file is a shared object + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_AR16WR file is 16-bit little-endian + F_AR32WR file is 32-bit little-endian + F_AR32W file is 32-bit big-endian + F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports + F_SHROBJ rs/6000 aix: file is a shared object F_DLL PE format DLL */ -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) -#define F_AR16WR (0x0080) -#define F_AR32WR (0x0100) -#define F_AR32W (0x0200) -#define F_DYNLOAD (0x1000) -#define F_SHROBJ (0x2000) -#define F_DLL (0x2000) +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) +#define F_AR16WR (0x0080) +#define F_AR32WR (0x0100) +#define F_AR32W (0x0200) +#define F_DYNLOAD (0x1000) +#define F_SHROBJ (0x2000) +#define F_DLL (0x2000) /* Extra structure which is used in the optional header. */ typedef struct _IMAGE_DATA_DIRECTORY @@ -189,7 +180,7 @@ struct internal_extra_pe_aouthdr /* Linker major version number. */ char MajorLinkerVersion; /* Linker minor version number. */ - char MinorLinkerVersion; + char MinorLinkerVersion; /* Total size of all code sections. */ bfd_vma SizeOfCode; /* Total size of all initialized data sections. */ @@ -239,7 +230,6 @@ struct internal_extra_pe_aouthdr IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; }; -/********************** AOUT "OPTIONAL HEADER" **********************/ struct internal_aouthdr { short magic; /* type of file */ @@ -286,7 +276,7 @@ struct internal_aouthdr struct internal_extra_pe_aouthdr pe; }; -/********************** STORAGE CLASSES **********************/ +/* Storage classes. */ /* This used to be defined as -1, but now n_sclass is unsigned. */ #define C_EFCN 0xff /* physical end of function */ @@ -316,7 +306,7 @@ struct internal_aouthdr #define C_EOS 102 /* end of structure */ #define C_FILE 103 /* file name */ #define C_LINE 104 /* line # reformatted as symbol table entry */ -#define C_ALIAS 105 /* duplicate tag */ +#define C_ALIAS 105 /* duplicate tag */ #define C_HIDDEN 106 /* ext symbol in dmert public lib */ #define C_WEAKEXT 127 /* weak symbol -- GNU extension. */ @@ -327,68 +317,66 @@ struct internal_aouthdr #define C_SYSTEM 23 /* System Wide variable */ /* New storage classes for WINDOWS_NT */ -#define C_SECTION 104 /* section name */ +#define C_SECTION 104 /* section name */ #define C_NT_WEAK 105 /* weak external */ - /* New storage classes for 80960 */ +/* New storage classes for 80960 */ /* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */ #define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */ #define C_SCALL 107 /* Procedure reachable via system call */ -#define C_LEAFEXT 108 /* External leaf */ -#define C_LEAFSTAT 113 /* Static leaf */ +#define C_LEAFEXT 108 /* External leaf */ +#define C_LEAFSTAT 113 /* Static leaf */ #define C_OPTVAR 109 /* Optimized variable */ #define C_DEFINE 110 /* Preprocessor #define */ #define C_PRAGMA 111 /* Advice to compiler or linker */ #define C_SEGMENT 112 /* 80960 segment name */ - /* New storage classes for RS/6000 */ -#define C_HIDEXT 107 /* Un-named external symbol */ -#define C_BINCL 108 /* Marks beginning of include file */ -#define C_EINCL 109 /* Marks ending of include file */ -#define C_AIX_WEAKEXT 111 /* AIX definition of C_WEAKEXT. */ -#define C_DWARF 112 /* DWARF symbol */ +/* New storage classes for RS/6000 */ +#define C_HIDEXT 107 /* Un-named external symbol */ +#define C_BINCL 108 /* Marks beginning of include file */ +#define C_EINCL 109 /* Marks ending of include file */ +#define C_AIX_WEAKEXT 111 /* AIX definition of C_WEAKEXT. */ +#define C_DWARF 112 /* DWARF symbol */ #define C_NULL_VALUE 0x00de1e00 /* Value for a C_NULL deleted entry. */ #ifdef AIX_WEAK_SUPPORT #undef C_WEAKEXT -#define C_WEAKEXT C_AIX_WEAKEXT +#define C_WEAKEXT C_AIX_WEAKEXT #endif - /* storage classes for stab symbols for RS/6000 */ -#define C_GSYM (0x80) -#define C_LSYM (0x81) -#define C_PSYM (0x82) -#define C_RSYM (0x83) -#define C_RPSYM (0x84) -#define C_STSYM (0x85) -#define C_TCSYM (0x86) -#define C_BCOMM (0x87) -#define C_ECOML (0x88) -#define C_ECOMM (0x89) -#define C_DECL (0x8c) -#define C_ENTRY (0x8d) -#define C_FUN (0x8e) -#define C_BSTAT (0x8f) -#define C_ESTAT (0x90) -#define C_GTLS (0x97) -#define C_STTLS (0x98) +/* storage classes for stab symbols for RS/6000 */ +#define C_GSYM (0x80) +#define C_LSYM (0x81) +#define C_PSYM (0x82) +#define C_RSYM (0x83) +#define C_RPSYM (0x84) +#define C_STSYM (0x85) +#define C_TCSYM (0x86) +#define C_BCOMM (0x87) +#define C_ECOML (0x88) +#define C_ECOMM (0x89) +#define C_DECL (0x8c) +#define C_ENTRY (0x8d) +#define C_FUN (0x8e) +#define C_BSTAT (0x8f) +#define C_ESTAT (0x90) +#define C_GTLS (0x97) +#define C_STTLS (0x98) /* Storage classes for Thumb symbols */ -#define C_THUMBEXT (128 + C_EXT) /* 130 */ -#define C_THUMBSTAT (128 + C_STAT) /* 131 */ -#define C_THUMBLABEL (128 + C_LABEL) /* 134 */ -#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */ +#define C_THUMBEXT (128 + C_EXT) /* 130 */ +#define C_THUMBSTAT (128 + C_STAT) /* 131 */ +#define C_THUMBLABEL (128 + C_LABEL) /* 134 */ +#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */ #define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */ /* True if XCOFF symbols of class CLASS have auxiliary csect information. */ #define CSECT_SYM_P(CLASS) \ ((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT || (CLASS) == C_HIDEXT) -/********************** SECTION HEADER **********************/ - #define SCNNMLEN (8) struct internal_scnhdr @@ -413,33 +401,43 @@ struct internal_scnhdr }; /* s_flags "type". */ -#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */ -#define STYP_DSECT (0x0001) /* "dummy": relocated only*/ -#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */ -#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */ -#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */ -#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated, - loaded; reloc & lineno entries processed normally */ -#define STYP_TEXT (0x0020) /* section contains text only */ -#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile - will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will - update all process invocations. */ -#define STYP_DATA (0x0040) /* section contains data only */ -#define STYP_BSS (0x0080) /* section contains bss only */ -#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */ -#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */ -#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */ -#define STYP_LIB (0x0800) /* for .lib: same as INFO */ -#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */ -#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions - wherever padding is necessary and there is a - word of contiguous bytes beginning on a word - boundary. */ - -#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */ - - -/********************** LINE NUMBERS **********************/ +#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */ +#define STYP_DSECT (0x0001) /* "dummy": relocated only*/ +#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, + not loaded */ +#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */ +#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, + loaded */ +#define STYP_COPY (0x0010) /* "copy": for decision function used by field + update; not allocated, not relocated, + loaded; + reloc & lineno entries processed normally */ +#define STYP_TEXT (0x0020) /* section contains text only */ +#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), + sections which appear in SHARED segments + of the Pfile will have the S_SHRSEG flag + set by ogen, to inform dufr that updating + 1 copy of the proc. will update all + process invocations. */ +#define STYP_DATA (0x0040) /* section contains data only */ +#define STYP_BSS (0x0080) /* section contains bss only */ +#define S_NEWFCN (0x0100) /* In a minimal file or an update file, + a new function (as compared with a + replaced function) */ +#define STYP_INFO (0x0200) /* comment: not allocated not relocated, + not loaded */ +#define STYP_OVER (0x0400) /* overlay: relocated not allocated or + loaded */ +#define STYP_LIB (0x0800) /* for .lib: same as INFO */ +#define STYP_MERGE (0x2000) /* merge section -- combines with text, + data or bss sections only */ +#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op + instructions wherever padding is necessary + and there is a word of contiguous bytes + beginning on a word boundary. */ + +#define STYP_LIT (0x8020) /* Literal data (like STYP_TEXT) */ + /* 1 line number entry for every "breakpointable" source line in a section. Line numbers are grouped on a per function basis; first entry in a function @@ -450,17 +448,13 @@ struct internal_lineno { union { - bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/ - bfd_signed_vma l_paddr; /* (physical) address of line number */ + bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0 */ + bfd_signed_vma l_paddr; /* (physical) address of line number */ } l_addr; unsigned long l_lnno; /* line number */ }; -/********************** SYMBOLS **********************/ - #define SYMNMLEN 8 /* # characters in a symbol name */ -#define FILNMLEN 14 /* # characters in a file name */ -#define DIMNUM 4 /* # array dimensions in auxiliary entry */ struct internal_syment { @@ -492,8 +486,10 @@ struct internal_syment #define N_UNDEF ((int)0) /* undefined symbol */ #define N_ABS ((int)-1) /* value of symbol is absolute */ #define N_DEBUG ((int)-2) /* debugging symbol -- value is meaningless */ -#define N_TV ((int)-3) /* indicates symbol needs preload transfer vector */ -#define P_TV ((int)-4) /* indicates symbol needs postload transfer vector*/ +#define N_TV ((int)-3) /* indicates symbol needs preload transfer + vector */ +#define P_TV ((int)-4) /* indicates symbol needs postload transfer + vector */ /* Type of a symbol, in low N bits of the word. */ @@ -505,9 +501,9 @@ struct internal_syment #define T_LONG 5 /* long integer */ #define T_FLOAT 6 /* floating point */ #define T_DOUBLE 7 /* double word */ -#define T_STRUCT 8 /* structure */ -#define T_UNION 9 /* union */ -#define T_ENUM 10 /* enumeration */ +#define T_STRUCT 8 /* structure */ +#define T_UNION 9 /* union */ +#define T_ENUM 10 /* enumeration */ #define T_MOE 11 /* member of enumeration*/ #define T_UCHAR 12 /* unsigned character */ #define T_USHORT 13 /* unsigned short */ @@ -539,10 +535,13 @@ struct internal_syment /* Visibility flag, in XCOFF n_type. */ #define SYM_V_INTERNAL 0x1000 #define SYM_V_HIDDEN 0x2000 -#define SYM_V_PROTECTED 0x3000 +#define SYM_V_PROTECTED 0x3000 #define SYM_V_EXPORTED 0x4000 #define SYM_V_MASK 0xF000 +#define FILNMLEN 14 /* # characters in a file name */ +#define DIMNUM 4 /* # array dimensions in auxiliary entry */ + union internal_auxent { struct @@ -616,16 +615,15 @@ union internal_auxent uint8_t x_comdat; /* COMDAT selection number for PE */ } x_scn; + /* info about .tv section (in auxent of symbol .tv). */ struct { uint32_t x_tvfill; /* tv fill value */ uint16_t x_tvlen; /* length of .tv */ uint16_t x_tvran[2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + } x_tv; - /****************************************** - * RS/6000-specific auxent - last auxent for every external symbol - ******************************************/ + /* RS/6000-specific auxent - last auxent for every external symbol. */ struct { union @@ -645,34 +643,34 @@ union internal_auxent /* x_smtyp values: */ -#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ -#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ +#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ +#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ /* Symbol type values: */ -#define XTY_ER 0 /* External reference */ -#define XTY_SD 1 /* Csect definition */ -#define XTY_LD 2 /* Label definition */ +#define XTY_ER 0 /* External reference */ +#define XTY_SD 1 /* Csect definition */ +#define XTY_LD 2 /* Label definition */ #define XTY_CM 3 /* .BSS */ -#define XTY_EM 4 /* Error message */ -#define XTY_US 5 /* "Reserved for internal use" */ +#define XTY_EM 4 /* Error message */ +#define XTY_US 5 /* "Reserved for internal use" */ /* x_smclas values: */ -#define XMC_PR 0 /* Read-only program code */ -#define XMC_RO 1 /* Read-only constant */ -#define XMC_DB 2 /* Read-only debug dictionary table */ -#define XMC_TC 3 /* Read-write general TOC entry */ -#define XMC_UA 4 /* Read-write unclassified */ -#define XMC_RW 5 /* Read-write data */ -#define XMC_GL 6 /* Read-only global linkage */ -#define XMC_XO 7 /* Read-only extended operation */ -#define XMC_SV 8 /* Read-only supervisor call */ -#define XMC_BS 9 /* Read-write BSS */ -#define XMC_DS 10 /* Read-write descriptor csect */ -#define XMC_UC 11 /* Read-write unnamed Fortran common */ -#define XMC_TI 12 /* Read-only traceback index csect */ -#define XMC_TB 13 /* Read-only traceback table csect */ -/* 14 ??? */ -#define XMC_TC0 15 /* Read-write TOC anchor */ +#define XMC_PR 0 /* Read-only program code */ +#define XMC_RO 1 /* Read-only constant */ +#define XMC_DB 2 /* Read-only debug dictionary table */ +#define XMC_TC 3 /* Read-write general TOC entry */ +#define XMC_UA 4 /* Read-write unclassified */ +#define XMC_RW 5 /* Read-write data */ +#define XMC_GL 6 /* Read-only global linkage */ +#define XMC_XO 7 /* Read-only extended operation */ +#define XMC_SV 8 /* Read-only supervisor call */ +#define XMC_BS 9 /* Read-write BSS */ +#define XMC_DS 10 /* Read-write descriptor csect */ +#define XMC_UC 11 /* Read-write unnamed Fortran common */ +#define XMC_TI 12 /* Read-only traceback index csect */ +#define XMC_TB 13 /* Read-only traceback table csect */ +/* 14 ??? */ +#define XMC_TC0 15 /* Read-write TOC anchor */ #define XMC_TD 16 /* Read-write data in TOC */ struct @@ -682,8 +680,6 @@ union internal_auxent } x_sect; }; -/********************** RELOCATION DIRECTIVES **********************/ - struct internal_reloc { bfd_vma r_vaddr; /* Virtual address of reference */ |