Mods to allow compilation of BFD all targets.
This commit is contained in:
parent
e48f66e46e
commit
4af1d5f662
7 changed files with 35 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2000-04-11 Timothy Wall <twall@cygnus.com>
|
||||||
|
|
||||||
|
* coff-tic54x.c: Now builds with all targets.
|
||||||
|
* Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
* coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
|
||||||
|
unitialized variable.
|
||||||
|
|
||||||
Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
* configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
|
* configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
|
||||||
|
|
|
@ -817,8 +817,9 @@ coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||||
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \
|
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||||
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \
|
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/ti.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/internal.h \
|
||||||
|
libcoff.h coffcode.h coffswap.h
|
||||||
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||||
coffcode.h coffswap.h
|
coffcode.h coffswap.h
|
||||||
|
|
|
@ -1345,8 +1345,9 @@ coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||||
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \
|
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||||
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \
|
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/ti.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/internal.h \
|
||||||
|
libcoff.h coffcode.h coffswap.h
|
||||||
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
||||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||||
coffcode.h coffswap.h
|
coffcode.h coffswap.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* BFD back-end for TMS320C54X coff binaries.
|
/* BFD back-end for TMS320C54X coff binaries.
|
||||||
Copyright (C) 1999,2000 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||||
Contributed by Timothy Wall (twall@cygnus.com)
|
Contributed by Timothy Wall (twall@cygnus.com)
|
||||||
|
|
||||||
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
||||||
|
@ -420,7 +420,7 @@ const bfd_target tic54x_coff0_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
@ -464,7 +464,7 @@ const bfd_target tic54x_coff0_beh_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
@ -509,7 +509,7 @@ const bfd_target tic54x_coff1_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
@ -554,7 +554,7 @@ const bfd_target tic54x_coff1_beh_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
@ -599,7 +599,7 @@ const bfd_target tic54x_coff2_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
@ -644,7 +644,7 @@ const bfd_target tic54x_coff2_beh_vec =
|
||||||
|
|
||||||
(HAS_RELOC | EXEC_P | /* object flags */
|
(HAS_RELOC | EXEC_P | /* object flags */
|
||||||
HAS_LINENO | HAS_DEBUG |
|
HAS_LINENO | HAS_DEBUG |
|
||||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT /*| HAS_LOAD_PAGE*/ ),
|
||||||
|
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||||
'_', /* leading symbol underscore */
|
'_', /* leading symbol underscore */
|
||||||
|
|
|
@ -2064,6 +2064,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
arch = bfd_arch_obscure;
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("Unrecognized TI COFF target id '0x%x'"),
|
(_("Unrecognized TI COFF target id '0x%x'"),
|
||||||
internal_f->f_target_id);
|
internal_f->f_target_id);
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2000-04-11 Timothy Wall <twall@cygnus.com>
|
||||||
|
|
||||||
|
* ti.h: Remove load page references until load pages are
|
||||||
|
reimplemented.
|
||||||
|
* tic54x.h: Ditto.
|
||||||
|
|
||||||
2000-04-07 Timothy Wall <twall@cygnus.com>
|
2000-04-07 Timothy Wall <twall@cygnus.com>
|
||||||
|
|
||||||
* internal.h: Fix some comments related to TI COFF (instead of tic80).
|
* internal.h: Fix some comments related to TI COFF (instead of tic80).
|
||||||
|
|
|
@ -71,11 +71,12 @@ struct external_filehdr {
|
||||||
#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID)
|
#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID)
|
||||||
|
|
||||||
/* we need to read/write an extra field in the coff file header */
|
/* we need to read/write an extra field in the coff file header */
|
||||||
|
/* FIXME load page */
|
||||||
#ifndef COFF_ADJUST_FILEHDR_IN_POST
|
#ifndef COFF_ADJUST_FILEHDR_IN_POST
|
||||||
#define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
|
#define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
|
||||||
do { ((struct internal_filehdr *)(dst))->f_target_id = \
|
do { ((struct internal_filehdr *)(dst))->f_target_id = \
|
||||||
bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
|
bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
|
||||||
((struct internal_filehdr *)(dst))->f_flags |= F_LDPAGE; \
|
/*((struct internal_filehdr *)(dst))->f_flags |= F_LDPAGE;*/ \
|
||||||
} while(0)
|
} while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -211,15 +212,18 @@ bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
|
||||||
#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
|
#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
|
||||||
bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
|
bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
|
||||||
|
|
||||||
|
/* FIXME load page
|
||||||
#define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
|
#define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
|
||||||
do { ((struct internal_scnhdr *)(INT))->s_page = \
|
do { ((struct internal_scnhdr *)(INT))->s_page = \
|
||||||
GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
|
GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
*/
|
||||||
|
|
||||||
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
|
/* 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.
|
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
|
Due to different sized v0/v1/v2 section headers, we have to re-write these
|
||||||
fields.
|
fields.
|
||||||
|
FIXME load page
|
||||||
*/
|
*/
|
||||||
#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
|
#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -229,8 +233,8 @@ PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
|
||||||
(bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
|
(bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
|
||||||
PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
|
PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
|
||||||
(bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
|
(bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
|
||||||
PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
|
/*PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
|
||||||
(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
|
(bfd_byte *)((SCNHDR *)(EXT))->s_page);*/ \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/* page macros
|
/* page macros
|
||||||
|
|
Loading…
Reference in a new issue