/[gcl]/gcl/binutils/include/coff/ti.h
ViewVC logotype

Diff of /gcl/binutils/include/coff/ti.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:36:43 2002 UTC revision 1.1.1.1.20.1 by camm, Fri Sep 30 02:10:24 2005 UTC
# Line 2  Line 2 
2     customized in a target-specific file, and then this file included (see     customized in a target-specific file, and then this file included (see
3     tic54x.h for an example).     tic54x.h for an example).
4        
5     Copyright 2001 Free Software Foundation, Inc.     Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6    
7     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 57  struct external_filehdr Line 57  struct external_filehdr
57  #error "TICOFF_TARGET_ARCH needs to be defined for your CPU"  #error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
58  #endif  #endif
59    
60    #ifndef TICOFF_TARGET_MACHINE_GET
61    #define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
62    #endif
63    
64    #ifndef TICOFF_TARGET_MACHINE_SET
65    #define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
66    #endif
67    
68  /* Default to COFF2 for file output */  /* Default to COFF2 for file output */
69  #ifndef TICOFF_DEFAULT_MAGIC  #ifndef TICOFF_DEFAULT_MAGIC
70  #define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC  #define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
# Line 118  struct external_filehdr Line 126  struct external_filehdr
126  #define F_RELFLG        (0x0001)  #define F_RELFLG        (0x0001)
127  #define F_EXEC          (0x0002)  #define F_EXEC          (0x0002)
128  #define F_LNNO          (0x0004)  #define F_LNNO          (0x0004)
129    #define F_VERS          (0x0010) /* TMS320C4x code */
130  /* F_LSYMS needs to be redefined in your source file */  /* F_LSYMS needs to be redefined in your source file */
131  #define F_LSYMS_TICOFF  (0x0010) /* normal COFF is 0x8 */  #define F_LSYMS_TICOFF  (0x0010) /* normal COFF is 0x8 */
132    
# Line 206  struct external_scnhdr { Line 215  struct external_scnhdr {
215     Assume we're dealing with the COFF2 scnhdr structure, and adjust     Assume we're dealing with the COFF2 scnhdr structure, and adjust
216     accordingly     accordingly
217   */   */
218  #define GET_SCNHDR_NRELOC(ABFD, PTR) \  #define GET_SCNHDR_NRELOC(ABFD, LOC) \
219    (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))    (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC))
220  #define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \  #define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \
221    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC))
222  #define GET_SCNHDR_NLNNO(ABFD, PTR) \  #define GET_SCNHDR_NLNNO(ABFD, LOC) \
223    (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))    (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2))
224  #define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \  #define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \
225    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2))
226  #define GET_SCNHDR_FLAGS(ABFD, PTR) \  #define GET_SCNHDR_FLAGS(ABFD, LOC) \
227    (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))    (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4))
228  #define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \  #define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \
229    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))    (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4))
230  #define GET_SCNHDR_PAGE(ABFD, PTR) \  #define GET_SCNHDR_PAGE(ABFD, LOC) \
231    (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))    (COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7))
232  /* on output, make sure that the "reserved" field is zero */  /* on output, make sure that the "reserved" field is zero */
233  #define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \  #define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \
234    (COFF2_P (ABFD) \    (COFF2_P (ABFD) \
235     ? H_PUT_16 (ABFD, VAL, PTR) \     ? H_PUT_16 (ABFD, VAL, LOC) \
236     : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))     : H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8))
237    
238  /* TI COFF stores section size as number of bytes (address units, not octets),  /* TI COFF stores section size as number of bytes (address units, not octets),
239     so adjust to be number of octets, which is what BFD expects */     so adjust to be number of octets, which is what BFD expects */

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.20.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26