URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/gnu-src/gdb-6.8/include/coff
- from Rev 157 to Rev 225
- ↔ Reverse comparison
Rev 157 → Rev 225
/xcoff.h
1,7 → 1,7
/* Internal format of XCOFF object file data structures for BFD. |
|
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 |
Free Software Foundation, Inc. |
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, |
2009 Free Software Foundation, Inc. |
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support. |
|
This file is part of BFD, the Binary File Descriptor library. |
214,6 → 214,8
#define L_ENTRY (0x20) |
/* Exported symbol. */ |
#define L_EXPORT (0x10) |
/* Weak symbol. */ |
#define L_WEAK (0x08) |
|
/* The ldrel structure. This is used to represent a reloc in the |
.loader section. */ |
291,11 → 293,12
#define XCOFF_LDREL 0x00000008 |
/* Symbol is the entry point. */ |
#define XCOFF_ENTRY 0x00000010 |
/* Symbol is called; this is, it appears in a R_BR reloc. */ |
/* Symbol is for a function and is the target of a relocation. |
The relocation may or may not be a branch-type relocation. */ |
#define XCOFF_CALLED 0x00000020 |
/* Symbol needs the TOC entry filled in. */ |
#define XCOFF_SET_TOC 0x00000040 |
/* Symbol is explicitly imported. */ |
/* Symbol is implicitly or explicitly imported. */ |
#define XCOFF_IMPORT 0x00000080 |
/* Symbol is explicitly exported. */ |
#define XCOFF_EXPORT 0x00000100 |
315,6 → 318,10
#define XCOFF_SYSCALL32 0x00008000 |
/* Symbol is an imported 64 bit syscall. */ |
#define XCOFF_SYSCALL64 0x00010000 |
/* Symbol was not explicitly defined by the time it was marked. */ |
#define XCOFF_WAS_UNDEFINED 0x00020000 |
/* We have assigned an output XCOFF entry to this symbol. */ |
#define XCOFF_ALLOCATED 0x00040000 |
|
/* The XCOFF linker hash table. */ |
|
326,65 → 333,10
#define XCOFF_SPECIAL_SECTION_END 4 |
#define XCOFF_SPECIAL_SECTION_END2 5 |
|
struct xcoff_link_hash_table |
{ |
struct bfd_link_hash_table root; |
/* These flags indicate which of -bexpall and -bexpfull are in effect. */ |
#define XCOFF_EXPALL 1 |
#define XCOFF_EXPFULL 2 |
|
/* The .debug string hash table. We need to compute this while |
reading the input files, so that we know how large the .debug |
section will be before we assign section positions. */ |
struct bfd_strtab_hash *debug_strtab; |
|
/* The .debug section we will use for the final output. */ |
asection *debug_section; |
|
/* The .loader section we will use for the final output. */ |
asection *loader_section; |
|
/* A count of non TOC relative relocs which will need to be |
allocated in the .loader section. */ |
size_t ldrel_count; |
|
/* The .loader section header. */ |
struct internal_ldhdr ldhdr; |
|
/* The .gl section we use to hold global linkage code. */ |
asection *linkage_section; |
|
/* The .tc section we use to hold toc entries we build for global |
linkage code. */ |
asection *toc_section; |
|
/* The .ds section we use to hold function descriptors which we |
create for exported symbols. */ |
asection *descriptor_section; |
|
/* The list of import files. */ |
struct xcoff_import_file *imports; |
|
/* Required alignment of sections within the output file. */ |
unsigned long file_align; |
|
/* Whether the .text section must be read-only. */ |
bfd_boolean textro; |
|
/* Whether garbage collection was done. */ |
bfd_boolean gc; |
|
/* A linked list of symbols for which we have size information. */ |
struct xcoff_link_size_list |
{ |
struct xcoff_link_size_list *next; |
struct xcoff_link_hash_entry *h; |
bfd_size_type size; |
} |
*size_list; |
|
/* Magic sections: _text, _etext, _data, _edata, _end, end. */ |
asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS]; |
}; |
|
|
/* This structure is used to pass information through |
xcoff_link_hash_traverse. */ |
|
399,8 → 351,8
/* Link information structure. */ |
struct bfd_link_info *info; |
|
/* Whether all defined symbols should be exported. */ |
bfd_boolean export_defineds; |
/* A mask of XCOFF_EXPALL and XCOFF_EXPFULL flags. */ |
unsigned int auto_export_flags; |
|
/* Number of ldsym structures. */ |
size_t ldsym_count; |
636,4 → 588,8
#define arch_xhdr_big(bfd) \ |
((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header) |
|
/* True if symbols of class CLASS are external. */ |
#define EXTERN_SYM_P(CLASS) \ |
((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT) |
|
#endif /* _INTERNAL_XCOFF_H */ |
/symconst.h
163,6 → 163,13
#define btVoid 26 /* void */ |
#define btLongLong 27 /* long long */ |
#define btULongLong 28 /* unsigned long long */ |
#define btLong64 30 /* long (64-bit) */ |
#define btULong64 31 /* unsigned long (64-bit) */ |
#define btLongLong64 32 /* long long (64-bit) */ |
#define btULongLong64 33 /* unsigned long long (64-bit) */ |
#define btAdr64 34 /* address (64-bit) */ |
#define btInt64 35 /* int (64-bit) */ |
#define btUInt64 36 /* unsigned int (64-bit) */ |
#define btMax 64 |
|
#if (_MFG == _MIPS) |
/ChangeLog
1,3 → 1,125
2009-09-05 Martin Thuresson <martin@mtme.org> |
|
* ti.h (GET_LNSZ_SIZE, PUT_LNSZ_SIZE): Updated name of class |
variable to in_class to match changes in function that use this |
macro. |
|
2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com> |
|
Fix references past allocated memory for i386-*-go32. |
* ti.h (COFF_ADJUST_FILEHDR_IN_POST, COFF_ADJUST_FILEHDR_OUT_POST): |
Reference F_TARGET_ID only when !COFF0_P. |
|
2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com> |
|
Stop using bfd_usrdata in libbfd. |
* go32exe.h (struct external_filehdr_go32_exe <stub>, FILHSZ): Replace |
STUBSIZE by GO32_STUBSIZE. |
(STUBSIZE): Move the definition ... |
* internal.h (GO32_STUBSIZE): ... here and rename it. |
(struct internal_filehdr <go32stub>, F_GO32STUB): New. |
|
2009-06-03 Ulrich Weigand <uweigand@de.ibm.com> |
|
* symconst.h (btLong64, btULong64, btLongLong64, btULongLong64, |
btAdr64, btInt64, btUInt64): New defines. |
|
2009-04-21 Kai Tietz <kai.tietz@onevision.com> |
|
* pe.h (pex64_runtime_function): New structure. |
(external_pex64_runtime_function): Likewise. |
(pex64_unwind_code): Likewise. |
(external_pex64_unwind_code): Likewise. |
(pex64_unwind_info): Likewise. |
(external_pex64_unwind_info): Likewise. |
(external_pex64_scope): Likewise. |
(pex64_scope): Likewise. |
(pex64_scope_entry): Likewise. |
(external_pex64_scope_entry): Likewise. |
(PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro. |
(PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise. |
(PEX64_UNWCODE_CODE): Likewise. |
(PEX64_UNWCODE_INFO): Likewise. |
(UWOP_...): Add defines for unwind code. |
(UNW_FLAG_...): Add defined for unwind info flags. |
(PEX64_SCOPE_ENTRY_SIZE): New macro. |
(PEX64_UWI_VERSION): Likewise. |
(PEX64_UWI_FLAGS): Likewise. |
(PEX64_UWI_FRAMEREG): Likewise. |
(PEX64_UWI_FRAMEOFF): Likewise. |
(PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise. |
(PEX64_OFFSET_TO_UNWIND_CODE): Likewise. |
(PEX64_OFFSET_TO_HANDLER_RVA): Likewise. |
(PEX64_OFFSET_TO_SCOPE_COUNT): Likewise. |
(PEX64_SCOPE_ENTRY): Likewise. |
|
2009-04-17 H.J. Lu <hongjiu.lu@intel.com> |
|
* pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ... |
(IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This. |
|
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com> |
|
* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c. |
|
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> |
|
* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags. |
(xcoff_loader_info): Add auto_export_flags. |
|
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> |
|
* internal.h (C_AIX_WEAKEXT): New macro. |
(C_WEAKEXT): Use the GNU definition in the generic part of the file, |
and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of |
the file. |
(CSECT_SYM_P): New macro. |
* xcoff.h (L_WEAK): Define. |
(EXTERN_SYM_P): New macro. |
|
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> |
|
* xcoff.h (XCOFF_ALLOCATED): New flag. |
|
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> |
|
* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments. |
(XCOFF_WAS_UNDEFINED): New flag. |
(xcoff_link_hash_table): Add an "rtld" field. |
|
2009-03-14 Dave Korn <dave.korn.cygwin@gmail.com> |
|
* internal.h (struct internal_extra_pe_aouthdr): Correct type |
of DllCharacteristics flags field to unsigned. |
* pe.h (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, |
IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, |
IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, |
IMAGE_DLLCHARACTERISTICS_NO_ISOLATION, |
IMAGE_DLLCHARACTERISTICS_NO_SEH, |
IMAGE_DLLCHARACTERISTICS_NO_BIND, |
IMAGE_DLLCHARACTERISTICS_WDM_DRIVER, |
IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE): New macros to |
define flag bit values for DllCharacteristics field of PEAOUTHDR, |
PEPAOUTHDR. |
|
2008-12-23 Johan Olmutz Nielsen <jnielsen@ddci.com> |
|
* ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define. |
|
2008-06-17 Nick Clifton <nickc@redhat.com> |
|
* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this |
macro which does not trigger an array bounds warning in gcc. |
(PUT_SCNHDR_NLNNO): Likewise. |
(GET_SCNHDR_FLAGS): Likewise. |
(PUT_SCNHDR_FLAGS): Likewise. |
(GET_SCNHDR_PAGE): Likewise. |
(PUT_SCNHDR_PAGE): Likewise. |
|
2007-11-05 Danny Smith <dannysmith@users.sourceforge.net> |
|
* pe.h (COFF_ENCODE_ALIGNMENT) Define. |
|
2007-08-02 H.J. Lu <hongjiu.lu@intel.com> |
|
* pe.h (IMAGE_SCN_ALIGN_POWER_BIT_POS): New. |
/pe.h
1,6 → 1,7
/* pe.h - PE COFF header information |
|
Copyright 1999, 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc. |
Copyright 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2009 |
Free Software Foundation, Inc. |
|
This file is part of BFD, the Binary File Descriptor library. |
|
38,6 → 39,17
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 |
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 |
|
/* DllCharacteristics flag bits. The inconsistent naming may seem |
odd, but that is how they are defined in the PE specification. */ |
#define IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE 0x0040 |
#define IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY 0x0080 |
#define IMAGE_DLL_CHARACTERISTICS_NX_COMPAT 0x0100 |
#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200 |
#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400 |
#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 |
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 |
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 |
|
/* Additional flags to be set for section headers to allow the NT loader to |
read and write to the section data (to replace the addresses of data in |
dlls for one thing); also to execute the section in .text's case. */ |
150,7 → 162,7
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 |
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 |
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 |
#define IMAGE_SUBSYSTEM_EFI_ROM 13 |
#define IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 |
#define IMAGE_SUBSYSTEM_XBOX 14 |
|
/* Magic values that are true for all dos/nt implementations. */ |
347,4 → 359,154
#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2 |
#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 |
|
/* .pdata/.xdata defines and structures for x64 PE+ for exception handling. */ |
|
/* .pdata in exception directory. */ |
|
struct pex64_runtime_function |
{ |
bfd_vma rva_BeginAddress; |
bfd_vma rva_EndAddress; |
bfd_vma rva_UnwindData; |
unsigned int isChained : 1; |
}; |
|
struct external_pex64_runtime_function |
{ |
bfd_byte rva_BeginAddress[4]; |
bfd_byte rva_EndAddress[4]; |
bfd_byte rva_UnwindData[4]; |
}; |
|
/* If the lowest significant bit is set for rva_UnwindData RVA, it |
means that the unified RVA points to another pex64_runtime_function |
that this entry shares the unwind_info block with. */ |
#define PEX64_IS_RUNTIME_FUNCTION_CHAINED(PTR_RTF) \ |
(((PTR_RTF)->rva_UnwindData & 1) != 0) |
#define PEX64_GET_UNWINDDATA_UNIFIED_RVA(PTR_RTF) \ |
((PTR_RTF)->rva_UnwindData & ~1) |
|
/* The unwind codes. */ |
#define UWOP_PUSH_NONVOL 0 |
#define UWOP_ALLOC_LARGE 1 |
#define UWOP_ALLOC_SMALL 2 |
#define UWOP_SET_FPREG 3 |
#define UWOP_SAVE_NONVOL 4 |
#define UWOP_SAVE_NONVOL_FAR 5 |
#define UWOP_SAVE_XMM 6 |
#define UWOP_SAVE_XMM_FAR 7 |
#define UWOP_SAVE_XMM128 8 |
#define UWOP_SAVE_XMM128_FAR 9 |
#define UWOP_PUSH_MACHFRAME 10 |
|
struct pex64_unwind_code |
{ |
bfd_vma prologue_offset; |
/* Contains Frame offset, or frame allocation size. */ |
bfd_vma frame_addr; |
unsigned int uwop_code : 4; |
/* xmm, mm, or standard register from 0 - 15. */ |
unsigned int reg : 4; |
/* Used for UWOP_PUSH_MACHFRAME to indicate optional errorcode stack |
argument. */ |
unsigned int has_errorcode : 1; |
}; |
|
struct external_pex64_unwind_code |
{ |
bfd_byte dta[2]; |
}; |
|
#define PEX64_UNWCODE_CODE(VAL) ((VAL) & 0xf) |
#define PEX64_UNWCODE_INFO(VAL) (((VAL) >> 4) & 0xf) |
|
/* The unwind info. */ |
#define UNW_FLAG_NHANDLER 0 |
#define UNW_FLAG_EHANDLER 1 |
#define UNW_FLAG_UHANDLER 2 |
#define UNW_FLAG_FHANDLER 3 |
#define UNW_FLAG_CHAININFO 4 |
|
#define UNW_FLAG_MASK 0x1f |
|
struct pex64_unwind_info |
{ |
bfd_vma SizeOfBlock; |
bfd_byte Version; /* Values from 0 up to 7 are possible. */ |
bfd_byte Flags; /* Values from 0 up to 31 are possible. */ |
bfd_vma SizeOfPrologue; |
bfd_vma CountOfCodes; /* Amount of pex64_unwind_code elements. */ |
/* 0 = CFA, 1..15 are index of integer registers. */ |
unsigned int FrameRegister : 4; |
bfd_vma FrameOffset; |
bfd_vma sizeofUnwindCodes; |
bfd_byte *rawUnwindCodes; |
/* Valid for UNW_FLAG_EHANDLER and UNW_FLAG_UHANDLER. */ |
bfd_vma CountOfScopes; |
bfd_byte *rawScopeEntries; |
bfd_vma rva_ExceptionHandler; /* UNW_EHANDLER. */ |
bfd_vma rva_TerminationHandler; /* UNW_FLAG_UHANDLER. */ |
bfd_vma rva_FrameHandler; /* UNW_FLAG_FHANDLER. */ |
bfd_vma FrameHandlerArgument; /* UNW_FLAG_FHANDLER. */ |
bfd_vma rva_FunctionEntry; /* UNW_FLAG_CHAININFO. */ |
}; |
|
struct external_pex64_unwind_info |
{ |
bfd_byte Version_Flags; |
bfd_byte SizeOfPrologue; |
bfd_byte CountOfCodes; |
bfd_byte FrameRegisterOffset; |
/* external_pex64_unwind_code array. */ |
/* bfd_byte handler[4]; */ |
/* Optional language specific data. */ |
}; |
|
struct external_pex64_scope |
{ |
bfd_vma Count; |
}; |
|
struct pex64_scope |
{ |
bfd_byte Count[4]; |
}; |
|
struct pex64_scope_entry |
{ |
bfd_vma rva_BeginAddress; |
bfd_vma rva_EndAddress; |
bfd_vma rva_HandlerAddress; |
bfd_vma rva_JumpAddress; |
}; |
#define PEX64_SCOPE_ENTRY_SIZE 16 |
|
struct external_pex64_scope_entry |
{ |
bfd_byte rva_BeginAddress[4]; |
bfd_byte rva_EndAddress[4]; |
bfd_byte rva_HandlerAddress[4]; |
bfd_byte rva_JumpAddress[4]; |
}; |
|
#define PEX64_UWI_VERSION(VAL) ((VAL) & 7) |
#define PEX64_UWI_FLAGS(VAL) (((VAL) >> 3) & 0x1f) |
#define PEX64_UWI_FRAMEREG(VAL) ((VAL) & 0xf) |
#define PEX64_UWI_FRAMEOFF(VAL) (((VAL) >> 4) & 0xf) |
#define PEX64_UWI_SIZEOF_UWCODE_ARRAY(VAL) \ |
((((VAL) + 1) & ~1) * 2) |
|
#define PEX64_OFFSET_TO_UNWIND_CODE 0x4 |
|
#define PEX64_OFFSET_TO_HANDLER_RVA (COUNTOFUNWINDCODES) \ |
(PEX64_OFFSET_TO_UNWIND_CODE + \ |
PEX64_UWI_SIZEOF_UWCODE_ARRAY(COUNTOFUNWINDCODES)) |
|
#define PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) \ |
(PEX64_OFFSET_TO_HANDLER_RVA(COUNTOFUNWINDCODES) + 4) |
|
#define PEX64_SCOPE_ENTRY(COUNTOFUNWINDCODES, IDX) \ |
(PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) + \ |
PEX64_SCOPE_ENTRY_SIZE * (IDX)) |
|
#endif /* _PE_H */ |
/internal.h
1,7 → 1,7
/* Internal format of COFF object file data structures, for GNU BFD. |
This file is part of BFD, the Binary File Descriptor library. |
|
Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006, 2007 |
Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006, 2007, 2009 |
Free Software Foundation, Inc. |
|
This program is free software; you can redistribute it and/or modify |
58,10 → 58,19
bfd_vma nt_signature; /* required NT signature, 0x4550 */ |
}; |
|
#define GO32_STUBSIZE 2048 |
|
struct internal_filehdr |
{ |
struct internal_extra_pe_filehdr pe; |
|
/* coff-stgo32 EXE stub header before BFD tdata has been allocated. |
Its data is kept in INTERNAL_FILEHDR.GO32STUB afterwards. |
|
F_GO32STUB is set iff go32stub contains a valid data. Artifical headers |
created in BFD have no pre-set go32stub. */ |
char go32stub[GO32_STUBSIZE]; |
|
/* Standard coff internal info. */ |
unsigned short f_magic; /* magic number */ |
unsigned short f_nscns; /* number of sections */ |
84,7 → 93,8
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. */ |
F_DLL PE format DLL |
F_GO32STUB Field go32stub contains valid data. */ |
|
#define F_RELFLG (0x0001) |
#define F_EXEC (0x0002) |
96,6 → 106,7
#define F_DYNLOAD (0x1000) |
#define F_SHROBJ (0x2000) |
#define F_DLL (0x2000) |
#define F_GO32STUB (0x4000) |
|
/* Extra structure which is used in the optional header. */ |
typedef struct _IMAGE_DATA_DIRECTORY |
185,7 → 196,7
3 - WINDOWS_CUI runs in Windows char sub. (console app) |
5 - OS2_CUI runs in OS/2 character subsystem |
7 - POSIX_CUI runs in Posix character subsystem */ |
short DllCharacteristics; /* flags for DLL init, use 0 */ |
unsigned short DllCharacteristics; /* flags for DLL init */ |
bfd_vma SizeOfStackReserve; /* amount of memory to reserve */ |
bfd_vma SizeOfStackCommit; /* amount of memory initially committed for |
initial thread's stack, default is 0x1000 */ |
273,12 → 284,7
#define C_LINE 104 /* line # reformatted as symbol table entry */ |
#define C_ALIAS 105 /* duplicate tag */ |
#define C_HIDDEN 106 /* ext symbol in dmert public lib */ |
|
#if defined _AIX52 || defined AIX_WEAK_SUPPORT |
#define C_WEAKEXT 111 /* weak symbol -- AIX standard. */ |
#else |
#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */ |
#endif |
|
/* New storage classes for TI COFF */ |
#define C_UEXT 19 /* Tentative external definition */ |
311,7 → 317,13
#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. */ |
|
#if defined _AIX52 || defined AIX_WEAK_SUPPORT |
#undef C_WEAKEXT |
#define C_WEAKEXT C_AIX_WEAKEXT |
#endif |
|
/* storage classes for stab symbols for RS/6000 */ |
#define C_GSYM (0x80) |
#define C_LSYM (0x81) |
336,6 → 348,10
#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */ |
#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */ |
|
/* True if XCOFF symbols of class CLASS have auxillary csect information. */ |
#define CSECT_SYM_P(CLASS) \ |
((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT || (CLASS) == C_HIDEXT) |
|
/********************** SECTION HEADER **********************/ |
|
#define SCNNMLEN (8) |
/go32exe.h
1,6 → 1,6
/* COFF information for PC running go32. |
|
Copyright 2001 Free Software Foundation, Inc. |
Copyright 2001, 2005, 2009 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 |
16,11 → 16,9
along with this program; if not, write to the Free Software |
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ |
|
#define STUBSIZE 2048 |
|
struct external_filehdr_go32_exe |
{ |
char stub[STUBSIZE];/* the stub to load the image */ |
char stub[GO32_STUBSIZE]; /* the stub to load the image */ |
/* the standard COFF header */ |
char f_magic[2]; /* magic number */ |
char f_nscns[2]; /* number of sections */ |
34,4 → 32,4
#undef FILHDR |
#define FILHDR struct external_filehdr_go32_exe |
#undef FILHSZ |
#define FILHSZ STUBSIZE+20 |
#define FILHSZ GO32_STUBSIZE+20 |
/ti.h
2,7 → 2,8
customized in a target-specific file, and then this file included (see |
tic54x.h for an example). |
|
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
Copyright 2000, 2001, 2002, 2003, 2005, 2008, 2009 |
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 |
102,8 → 103,9
#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \ |
do \ |
{ \ |
((struct internal_filehdr *)(dst))->f_target_id = \ |
H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \ |
if (!COFF0_P (abfd)) \ |
((struct internal_filehdr *)(dst))->f_target_id = \ |
H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \ |
} \ |
while (0) |
#endif |
110,11 → 112,12
|
#ifndef COFF_ADJUST_FILEHDR_OUT_POST |
#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \ |
do \ |
{ \ |
H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \ |
((FILHDR *)(dst))->f_target_id); \ |
} \ |
do \ |
{ \ |
if (!COFF0_P (abfd)) \ |
H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \ |
((FILHDR *)(dst))->f_target_id); \ |
} \ |
while (0) |
#endif |
|
213,13 → 216,82
|
/* COFF2 changes the offsets and sizes of these fields |
Assume we're dealing with the COFF2 scnhdr structure, and adjust |
accordingly |
*/ |
accordingly. Note: The GNU C versions of some of these macros |
are necessary in order to avoid compile time warnings triggered |
gcc's array bounds checking. The PUT_SCNHDR_PAGE macro also has |
the advantage on not evaluating LOC twice. */ |
|
#define GET_SCNHDR_NRELOC(ABFD, LOC) \ |
(COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC)) |
#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \ |
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC)) |
#ifdef __GNUC__ |
#define GET_SCNHDR_NLNNO(ABFD, LOC) \ |
({ \ |
int nlnno; \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
nlnno = H_GET_32 (ABFD, ptr); \ |
else \ |
nlnno = H_GET_16 (ABFD, ptr - 2); \ |
nlnno; \ |
}) |
#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \ |
do \ |
{ \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
H_PUT_32 (ABFD, VAL, ptr); \ |
else \ |
H_PUT_16 (ABFD, VAL, ptr - 2); \ |
} \ |
while (0) |
#define GET_SCNHDR_FLAGS(ABFD, LOC) \ |
({ \ |
int flags; \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
flags = H_GET_32 (ABFD, ptr); \ |
else \ |
flags = H_GET_16 (ABFD, ptr - 4); \ |
flags; \ |
}) |
#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \ |
do \ |
{ \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
H_PUT_32 (ABFD, VAL, ptr); \ |
else \ |
H_PUT_16 (ABFD, VAL, ptr - 4); \ |
} \ |
while (0) |
#define GET_SCNHDR_PAGE(ABFD, LOC) \ |
({ \ |
unsigned page; \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
page = H_GET_16 (ABFD, ptr); \ |
else \ |
page = (unsigned) H_GET_8 (ABFD, ptr - 7); \ |
page; \ |
}) |
/* On output, make sure that the "reserved" field is zero. */ |
#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \ |
do \ |
{ \ |
char * ptr = (LOC); \ |
if (COFF2_P (ABFD)) \ |
H_PUT_16 (ABFD, VAL, ptr); \ |
else \ |
{ \ |
H_PUT_8 (ABFD, VAL, ptr - 7); \ |
H_PUT_8 (ABFD, 0, ptr - 8); \ |
} \ |
} \ |
while (0) |
#else |
#define GET_SCNHDR_NLNNO(ABFD, LOC) \ |
(COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2)) |
#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \ |
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2)) |
229,12 → 301,14
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4)) |
#define GET_SCNHDR_PAGE(ABFD, LOC) \ |
(COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7)) |
/* on output, make sure that the "reserved" field is zero */ |
/* On output, make sure that the "reserved" field is zero. */ |
#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \ |
(COFF2_P (ABFD) \ |
? H_PUT_16 (ABFD, VAL, LOC) \ |
: H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8)) |
#endif |
|
|
/* TI COFF stores section size as number of bytes (address units, not octets), |
so adjust to be number of octets, which is what BFD expects */ |
#define GET_SCNHDR_SIZE(ABFD, SZP) \ |
250,6 → 324,15
} \ |
while (0) |
|
/* The entire scnhdr may not be assigned. |
Ensure that everything is initialized. */ |
#define COFF_ADJUST_SCNHDR_OUT_PRE(ABFD, INT, EXT) \ |
do \ |
{ \ |
memset((EXT), 0, sizeof (SCNHDR)); \ |
} \ |
while (0) |
|
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in |
coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc. |
Due to different sized v0/v1/v2 section headers, we have to re-write these |
393,10 → 476,10
|
/* lnsz size is in bits in COFF file, in bytes in BFD */ |
#define GET_LNSZ_SIZE(abfd, ext) \ |
(H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1)) |
(H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (in_class != C_FIELD ? 8 : 1)) |
|
#define PUT_LNSZ_SIZE(abfd, in, ext) \ |
H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \ |
H_PUT_16 (abfd, ((in_class != C_FIELD) ? (in) * 8 : (in)), \ |
ext->x_sym.x_misc.x_lnsz.x_size) |
|
/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes |