* coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
(GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define. * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define. * coffcode.h (coff_set_alignment_hook): Conditionally compile in if COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power of two for I960 only. * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO, PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide default definitions. (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN. (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN. start-sanitize-tic80 * Makefile.in (coff-tic80.o): Depends upon coffswap.h. * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1. (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define *coffcode.h (coff_write_object_contents): Set alignment field in section header for TIC80COFF files. end-sanitize-tic80 PR 12215 and PR 13061
This commit is contained in:
parent
ee804cff4f
commit
c4188c2a6a
|
@ -1,3 +1,25 @@
|
||||||
|
Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
* coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
|
||||||
|
(GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
|
||||||
|
* coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
|
||||||
|
* coffcode.h (coff_set_alignment_hook): Conditionally compile in if
|
||||||
|
COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
|
||||||
|
of two for I960 only.
|
||||||
|
* coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
|
||||||
|
PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
|
||||||
|
default definitions.
|
||||||
|
(coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
|
||||||
|
GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
|
||||||
|
(coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
|
||||||
|
start-sanitize-tic80
|
||||||
|
* Makefile.in (coff-tic80.o): Depends upon coffswap.h.
|
||||||
|
* coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
|
||||||
|
(GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
|
||||||
|
*coffcode.h (coff_write_object_contents): Set alignment field in
|
||||||
|
section header for TIC80COFF files.
|
||||||
|
end-sanitize-tic80
|
||||||
|
|
||||||
start-sanitize-v850
|
start-sanitize-v850
|
||||||
Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
|
Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "libcoff.h"
|
#include "libcoff.h"
|
||||||
|
|
||||||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
|
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
|
||||||
|
#define COFF_ALIGN_IN_SECTION_HEADER 1
|
||||||
|
|
||||||
|
#define GET_SCNHDR_FLAGS bfd_h_get_16
|
||||||
|
#define PUT_SCNHDR_FLAGS bfd_h_put_16
|
||||||
|
|
||||||
static void rtype2howto
|
static void rtype2howto
|
||||||
PARAMS ((arelent *cache_ptr, struct internal_reloc *dst));
|
PARAMS ((arelent *cache_ptr, struct internal_reloc *dst));
|
||||||
|
@ -704,7 +708,9 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TIC80 1 /* Customize coffcode.h */
|
#define TIC80COFF 1 /* Customize coffcode.h */
|
||||||
|
#undef C_AUTOARG /* Clashes with TIc80's C_UEXT */
|
||||||
|
#undef C_LASTENT /* Clashes with TIc80's C_STATLAB */
|
||||||
#include "coffcode.h"
|
#include "coffcode.h"
|
||||||
|
|
||||||
const bfd_target
|
const bfd_target
|
||||||
|
|
|
@ -1056,7 +1056,7 @@ coff_new_section_hook (abfd, section)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef I960
|
#ifdef COFF_ALIGN_IN_SECTION_HEADER
|
||||||
|
|
||||||
/* Set the alignment of a BFD section. */
|
/* Set the alignment of a BFD section. */
|
||||||
|
|
||||||
|
@ -1071,13 +1071,22 @@ coff_set_alignment_hook (abfd, section, scnhdr)
|
||||||
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
|
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
#ifdef I960
|
||||||
|
/* Extract ALIGN from 2**ALIGN stored in section header */
|
||||||
for (i = 0; i < 32; i++)
|
for (i = 0; i < 32; i++)
|
||||||
if ((1 << i) >= hdr->s_align)
|
if ((1 << i) >= hdr->s_align)
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
#ifdef TIC80COFF
|
||||||
|
/* TI tools hijack bits 8-11 for the alignment */
|
||||||
|
i = (hdr->s_flags >> 8) & 0xF ;
|
||||||
|
#endif
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
section->alignment_power = i;
|
section->alignment_power = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! I960 */
|
#else /* ! COFF_ALIGN_IN_SECTION_HEADER */
|
||||||
#ifdef COFF_WITH_PE
|
#ifdef COFF_WITH_PE
|
||||||
|
|
||||||
/* a couple of macros to help setting the alignment power field */
|
/* a couple of macros to help setting the alignment power field */
|
||||||
|
@ -1222,7 +1231,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
|
||||||
|
|
||||||
#endif /* ! RS6000COFF_C */
|
#endif /* ! RS6000COFF_C */
|
||||||
#endif /* ! COFF_WITH_PE */
|
#endif /* ! COFF_WITH_PE */
|
||||||
#endif /* ! I960 */
|
#endif /* ! COFF_ALIGN_IN_SECTION_HEADER */
|
||||||
|
|
||||||
#ifndef coff_mkobject
|
#ifndef coff_mkobject
|
||||||
|
|
||||||
|
@ -1584,11 +1593,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
#ifdef TIC80_ARCH_MAGIC
|
#ifdef TIC80_ARCH_MAGIC
|
||||||
case TIC80_ARCH_MAGIC:
|
case TIC80_ARCH_MAGIC:
|
||||||
arch = bfd_arch_tic80;
|
arch = bfd_arch_tic80;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
|
|
||||||
default: /* Unreadable input file type */
|
default: /* Unreadable input file type */
|
||||||
arch = bfd_arch_obscure;
|
arch = bfd_arch_obscure;
|
||||||
|
@ -2641,7 +2652,12 @@ coff_write_object_contents (abfd)
|
||||||
section.s_align = (current->alignment_power
|
section.s_align = (current->alignment_power
|
||||||
? 1 << current->alignment_power
|
? 1 << current->alignment_power
|
||||||
: 0);
|
: 0);
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
#else
|
||||||
|
#ifdef TIC80COFF
|
||||||
|
section.s_flags |= (current->alignment_power & 0xF) << 8;
|
||||||
|
#endif
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef COFF_IMAGE_WITH_PE
|
#ifdef COFF_IMAGE_WITH_PE
|
||||||
|
@ -2793,6 +2809,12 @@ coff_write_object_contents (abfd)
|
||||||
else
|
else
|
||||||
internal_f.f_flags |= F_AR32W;
|
internal_f.f_flags |= F_AR32W;
|
||||||
|
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
#ifdef TIC80_TARGET_ID
|
||||||
|
internal_f.f_target_id = TIC80_TARGET_ID;
|
||||||
|
#endif
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FIXME, should do something about the other byte orders and
|
FIXME, should do something about the other byte orders and
|
||||||
architectures.
|
architectures.
|
||||||
|
@ -2830,10 +2852,12 @@ coff_write_object_contents (abfd)
|
||||||
internal_a.magic = NMAGIC; /* Assume separate i/d */
|
internal_a.magic = NMAGIC; /* Assume separate i/d */
|
||||||
#define __A_MAGIC_SET__
|
#define __A_MAGIC_SET__
|
||||||
#endif /* A29K */
|
#endif /* A29K */
|
||||||
#ifdef TIC80
|
/* start-sanitize-tic80 */
|
||||||
|
#ifdef TIC80COFF
|
||||||
internal_a.magic = TIC80_ARCH_MAGIC;
|
internal_a.magic = TIC80_ARCH_MAGIC;
|
||||||
#define __A_MAGIC_SET__
|
#define __A_MAGIC_SET__
|
||||||
#endif /* TIC80 */
|
#endif /* TIC80 */
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
#ifdef I860
|
#ifdef I860
|
||||||
/* FIXME: What are the a.out magic numbers for the i860? */
|
/* FIXME: What are the a.out magic numbers for the i860? */
|
||||||
internal_a.magic = 0;
|
internal_a.magic = 0;
|
||||||
|
@ -2896,7 +2920,7 @@ coff_write_object_contents (abfd)
|
||||||
#endif /* LYNXOS */
|
#endif /* LYNXOS */
|
||||||
#endif /* SPARC */
|
#endif /* SPARC */
|
||||||
|
|
||||||
#if RS6000COFF_C
|
#ifdef RS6000COFF_C
|
||||||
#define __A_MAGIC_SET__
|
#define __A_MAGIC_SET__
|
||||||
internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
|
internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
|
||||||
(abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
|
(abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
|
||||||
|
@ -3383,6 +3407,9 @@ coff_slurp_symbol_table (abfd)
|
||||||
#ifdef RS6000COFF_C
|
#ifdef RS6000COFF_C
|
||||||
case C_HIDEXT:
|
case C_HIDEXT:
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef C_SYSTEM
|
||||||
|
case C_SYSTEM: /* System Wide variable */
|
||||||
|
#endif
|
||||||
#ifdef COFF_WITH_PE
|
#ifdef COFF_WITH_PE
|
||||||
/* PE uses storage class 0x68 to denote a section symbol */
|
/* PE uses storage class 0x68 to denote a section symbol */
|
||||||
case C_SECTION:
|
case C_SECTION:
|
||||||
|
@ -3478,9 +3505,15 @@ coff_slurp_symbol_table (abfd)
|
||||||
#endif
|
#endif
|
||||||
case C_REGPARM: /* register parameter */
|
case C_REGPARM: /* register parameter */
|
||||||
case C_REG: /* register variable */
|
case C_REG: /* register variable */
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
#ifndef TIC80COFF
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
#ifdef C_AUTOARG
|
#ifdef C_AUTOARG
|
||||||
case C_AUTOARG: /* 960-specific storage class */
|
case C_AUTOARG: /* 960-specific storage class */
|
||||||
#endif
|
#endif
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
#endif
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
case C_TPDEF: /* type definition */
|
case C_TPDEF: /* type definition */
|
||||||
case C_ARG:
|
case C_ARG:
|
||||||
case C_AUTO: /* automatic variable */
|
case C_AUTO: /* automatic variable */
|
||||||
|
@ -3583,6 +3616,14 @@ coff_slurp_symbol_table (abfd)
|
||||||
/* NT uses 0x67 for a weak symbol, not C_ALIAS. */
|
/* NT uses 0x67 for a weak symbol, not C_ALIAS. */
|
||||||
case C_ALIAS: /* duplicate tag */
|
case C_ALIAS: /* duplicate tag */
|
||||||
#endif
|
#endif
|
||||||
|
/* start-sanitize-tic80 */
|
||||||
|
/* New storage classes for TIc80 */
|
||||||
|
#ifdef TIC80COFF
|
||||||
|
case C_UEXT: /* Tentative external definition */
|
||||||
|
#endif
|
||||||
|
case C_STATLAB: /* Static load time label */
|
||||||
|
case C_EXTLAB: /* External load time label */
|
||||||
|
/* end-sanitize-tic80 */
|
||||||
case C_HIDDEN: /* ext symbol in dmert public lib */
|
case C_HIDDEN: /* ext symbol in dmert public lib */
|
||||||
default:
|
default:
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
|
|
Loading…
Reference in New Issue