* archures.c: Add some more MSP430 machine numbers.

* config.bfd (msp430): Define targ_selvecs.
	* configure.in: Add bfd_elf32_msp430_ti_vec.
	* cpu-msp430.c: Add some more MSP430 machine numbers.
	* elf32-msp430.c Add support for MSP430X relocations.
	Add support for TI compiler generated relocations.
	Add support for sym_diff relocations.
	Add support for relaxing out of range short branches into long
	branches.
	Add support for MSP430 attribute section.
	* reloc.c: Add MSP430X relocations.
	* targets.c: Add bfd_elf32_msp430_ti_vec.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* libbfd.h: Regenerate.

	* readelf.c: Add support for MSP430X architecture.

	* readelf.exp: Expect -wi test to fail for the MSP430.

	* config/tc-msp430.c: Add support for the MSP430X architecture.
	Add code to insert a NOP instruction after any instruction that
	might change the interrupt state.
	Add support for the LARGE memory model.
	Add code to initialise the .MSP430.attributes section.
	* config/tc-msp430.h: Add support for the MSP430X architecture.
	* doc/c-msp430.texi: Document the new -mL and -mN command line
	options.
	* NEWS: Mention support for the MSP430X architecture.

	* gas/all/gas.exp: Skip the DIFF1 test for the MSP430.
	Expect the FORWARD test to pass for the MSP430.
	Skip the REDEF tests for the MSP430.
	Expect the 930509A test to fail for the MSP430.
	* gas/all/sleb128-4.d: Skip for the MSP430.
	* gas/elf/elf.exp: Set target_machine to msp430 for the MSP430.
	Skip the EHOPT0 test for the MSP430.
	Skip the REDEF and EQU-RELOC tests for the MSP430.
	* gas/elf/section2.e-msp430: New file.
	* gas/lns/lns-big-delta.d: Remove expectation of 20-bit
	addresses.
	* gas/lns/lns.exp: Use alternate LNS COMMON test for the MSP430.
	* gas/msp430/msp430x.s: New test.
	* gas/msp430/msp430x.d: Expected disassembly.
	* gas/msp430/msp430.exp: Run new test.
	* gas/msp430/opcode.d: Update expected disassembly.

	* msp430.h: Add MSP430X relocs.
	Add some more MSP430 machine numbers.
	Add values used by .MSP430.attributes section.

	* msp430.h: Add patterns for MSP430X instructions.

	* Makefile.am: Add emsp430X.c
	* Makefine.in: Regenerate.
	* configure.tgt (msp430): Add msp430X emulation.
	* ldmain.c (multiple_definition): Only disable relaxation if it
	was enabled by the user.
	* ldmain.h (RELAXATION_ENABLED_BY_USER): New macro.
	* emulparams/msp430all.sh: Add support for MSP430X.
	* emultempl/generic.em: (before_parse): Enable relaxation for the
	MSP430.
	* scripttempl/msp430.sc: Reorganize sections.  Add .rodata
	section.
	* scripttempl/msp430_3.sc: Likewise.
	* NEWS: Mention support for MSP430X.

	* ld-elf/flags1.d: Expect this test to pass on the MSP430.
	* ld-elf/init-fini-arrays.d: Expect this test to fail on the
	MSP430.
	* ld-elf/merge.d: Expect this test to pass on the MSP430.
	* ld-elf/sec64k.exp: Skip these tests for the MSP430.
	* ld-gc/pr13683.d: Expect this test to fail on the MSP430.
	* ld-srec/srec.exp: Expect these tests to fail on the MSP430.
	* ld-undefined/undefined.exp: Expect the UNDEFINED LINE test to
	fail on the MSP430.

	* msp430-dis.c: Add support for MSP430X instructions.
This commit is contained in:
Nick Clifton
2013-05-02 21:06:15 +00:00
parent 4925cdd75b
commit 13761a1136
52 changed files with 4749 additions and 821 deletions

View File

@ -1,3 +1,21 @@
2013-05-02 Nick Clifton <nickc@redhat.com>
* archures.c: Add some more MSP430 machine numbers.
* config.bfd (msp430): Define targ_selvecs.
* configure.in: Add bfd_elf32_msp430_ti_vec.
* cpu-msp430.c: Add some more MSP430 machine numbers.
* elf32-msp430.c Add support for MSP430X relocations.
Add support for TI compiler generated relocations.
Add support for sym_diff relocations.
Add support for relaxing out of range short branches into long
branches.
Add support for MSP430 attribute section.
* reloc.c: Add MSP430X relocations.
* targets.c: Add bfd_elf32_msp430_ti_vec.
* bfd-in2.h: Regenerate.
* configure: Regenerate.
* libbfd.h: Regenerate.
2013-05-01 Maciej W. Rozycki <macro@codesourcery.com>
* config.bfd: Replace alpha*-*-linuxecoff* pattern with

View File

@ -1,7 +1,5 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013 Free Software Foundation, Inc.
Copyright 1990-2013 Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -437,7 +435,12 @@ DESCRIPTION
.#define bfd_mach_msp14 14
.#define bfd_mach_msp15 15
.#define bfd_mach_msp16 16
.#define bfd_mach_msp20 20
.#define bfd_mach_msp21 21
.#define bfd_mach_msp22 22
.#define bfd_mach_msp23 23
.#define bfd_mach_msp24 24
.#define bfd_mach_msp26 26
.#define bfd_mach_msp31 31
.#define bfd_mach_msp32 32
.#define bfd_mach_msp33 33
@ -445,6 +448,10 @@ DESCRIPTION
.#define bfd_mach_msp42 42
.#define bfd_mach_msp43 43
.#define bfd_mach_msp44 44
.#define bfd_mach_msp430x 45
.#define bfd_mach_msp46 46
.#define bfd_mach_msp47 47
.#define bfd_mach_msp54 54
. bfd_arch_xc16x, {* Infineon's XC16X Series. *}
.#define bfd_mach_xc16x 1
.#define bfd_mach_xc16xl 2

View File

@ -2170,7 +2170,12 @@ enum bfd_architecture
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
#define bfd_mach_msp16 16
#define bfd_mach_msp20 20
#define bfd_mach_msp21 21
#define bfd_mach_msp22 22
#define bfd_mach_msp23 23
#define bfd_mach_msp24 24
#define bfd_mach_msp26 26
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
@ -2178,6 +2183,10 @@ enum bfd_architecture
#define bfd_mach_msp42 42
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
#define bfd_mach_msp430x 45
#define bfd_mach_msp46 46
#define bfd_mach_msp47 47
#define bfd_mach_msp54 54
bfd_arch_xc16x, /* Infineon's XC16X Series. */
#define bfd_mach_xc16x 1
#define bfd_mach_xc16xl 2
@ -4918,6 +4927,21 @@ a matching LO8XG part. */
BFD_RELOC_MSP430_16_BYTE,
BFD_RELOC_MSP430_2X_PCREL,
BFD_RELOC_MSP430_RL_PCREL,
BFD_RELOC_MSP430_ABS8,
BFD_RELOC_MSP430X_PCR20_EXT_SRC,
BFD_RELOC_MSP430X_PCR20_EXT_DST,
BFD_RELOC_MSP430X_PCR20_EXT_ODST,
BFD_RELOC_MSP430X_ABS20_EXT_SRC,
BFD_RELOC_MSP430X_ABS20_EXT_DST,
BFD_RELOC_MSP430X_ABS20_EXT_ODST,
BFD_RELOC_MSP430X_ABS20_ADR_SRC,
BFD_RELOC_MSP430X_ABS20_ADR_DST,
BFD_RELOC_MSP430X_PCR16,
BFD_RELOC_MSP430X_PCR20_CALL,
BFD_RELOC_MSP430X_ABS16,
BFD_RELOC_MSP430_ABS_HI16,
BFD_RELOC_MSP430_PREL31,
BFD_RELOC_MSP430_SYM_DIFF,
/* Relocations used by the Altera Nios II core. */
BFD_RELOC_NIOS2_S16,

View File

@ -1134,6 +1134,7 @@ case "${targ}" in
msp430-*-*)
targ_defvec=bfd_elf32_msp430_vec
targ_selvecs=bfd_elf32_msp430_ti_vec
;;
ns32k-pc532-mach* | ns32k-pc532-ux*)

1
bfd/configure vendored
View File

@ -15292,6 +15292,7 @@ do
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_msp430_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright 2012 Free Software Foundation
dnl Copyright 2012-2013 Free Software Foundation
dnl
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -789,6 +789,7 @@ do
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_msp430_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)

View File

@ -1,6 +1,5 @@
/* BFD library support routines for the MSP architecture.
Copyright (C) 2002, 2003, 2005, 2007, 2012
Free Software Foundation, Inc.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@ -82,29 +81,56 @@ static const bfd_arch_info_type arch_info_struct[] =
/* msp430x16x. */
N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[7]),
/* msp430x20x. */
N (16, bfd_mach_msp20, "msp:20", FALSE, & arch_info_struct[8]),
/* msp430x21x. */
N (16, bfd_mach_msp21, "msp:21", FALSE, & arch_info_struct[8]),
N (16, bfd_mach_msp21, "msp:21", FALSE, & arch_info_struct[9]),
/* msp430x22x. */
N (16, bfd_mach_msp22, "msp:22", FALSE, & arch_info_struct[10]),
/* msp430x23x. */
N (16, bfd_mach_msp23, "msp:23", FALSE, & arch_info_struct[11]),
/* msp430x24x. */
N (16, bfd_mach_msp24, "msp:24", FALSE, & arch_info_struct[12]),
/* msp430x26x. */
N (16, bfd_mach_msp26, "msp:26", FALSE, & arch_info_struct[13]),
/* msp430x31x. */
N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[9]),
N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[14]),
/* msp430x32x. */
N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[10]),
N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[15]),
/* msp430x33x. */
N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[11]),
N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[16]),
/* msp430x41x. */
N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[12]),
N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[17]),
/* msp430x42x. */
N (16, bfd_mach_msp42, "msp:42", FALSE, & arch_info_struct[13]),
N (16, bfd_mach_msp42, "msp:42", FALSE, & arch_info_struct[18]),
/* msp430x43x. */
N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[14]),
N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[19]),
/* msp430x44x. */
N (16, bfd_mach_msp43, "msp:44", FALSE, NULL)
N (16, bfd_mach_msp43, "msp:44", FALSE, & arch_info_struct[20]),
/* msp430x46x. */
N (16, bfd_mach_msp46, "msp:46", FALSE, & arch_info_struct[21]),
/* msp430x47x. */
N (16, bfd_mach_msp47, "msp:47", FALSE, & arch_info_struct[22]),
/* msp430x54x. */
N (16, bfd_mach_msp54, "msp:54", FALSE, & arch_info_struct[23]),
N (32, bfd_mach_msp430x, "msp:430X", FALSE, NULL)
};
const bfd_arch_info_type bfd_msp430_arch =

File diff suppressed because it is too large Load Diff

View File

@ -2376,6 +2376,21 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MSP430_16_BYTE",
"BFD_RELOC_MSP430_2X_PCREL",
"BFD_RELOC_MSP430_RL_PCREL",
"BFD_RELOC_MSP430_ABS8",
"BFD_RELOC_MSP430X_PCR20_EXT_SRC",
"BFD_RELOC_MSP430X_PCR20_EXT_DST",
"BFD_RELOC_MSP430X_PCR20_EXT_ODST",
"BFD_RELOC_MSP430X_ABS20_EXT_SRC",
"BFD_RELOC_MSP430X_ABS20_EXT_DST",
"BFD_RELOC_MSP430X_ABS20_EXT_ODST",
"BFD_RELOC_MSP430X_ABS20_ADR_SRC",
"BFD_RELOC_MSP430X_ABS20_ADR_DST",
"BFD_RELOC_MSP430X_PCR16",
"BFD_RELOC_MSP430X_PCR20_CALL",
"BFD_RELOC_MSP430X_ABS16",
"BFD_RELOC_MSP430_ABS_HI16",
"BFD_RELOC_MSP430_PREL31",
"BFD_RELOC_MSP430_SYM_DIFF",
"BFD_RELOC_NIOS2_S16",
"BFD_RELOC_NIOS2_U16",
"BFD_RELOC_NIOS2_CALL26",

View File

@ -5662,6 +5662,36 @@ ENUMX
BFD_RELOC_MSP430_2X_PCREL
ENUMX
BFD_RELOC_MSP430_RL_PCREL
ENUMX
BFD_RELOC_MSP430_ABS8
ENUMX
BFD_RELOC_MSP430X_PCR20_EXT_SRC
ENUMX
BFD_RELOC_MSP430X_PCR20_EXT_DST
ENUMX
BFD_RELOC_MSP430X_PCR20_EXT_ODST
ENUMX
BFD_RELOC_MSP430X_ABS20_EXT_SRC
ENUMX
BFD_RELOC_MSP430X_ABS20_EXT_DST
ENUMX
BFD_RELOC_MSP430X_ABS20_EXT_ODST
ENUMX
BFD_RELOC_MSP430X_ABS20_ADR_SRC
ENUMX
BFD_RELOC_MSP430X_ABS20_ADR_DST
ENUMX
BFD_RELOC_MSP430X_PCR16
ENUMX
BFD_RELOC_MSP430X_PCR20_CALL
ENUMX
BFD_RELOC_MSP430X_ABS16
ENUMX
BFD_RELOC_MSP430_ABS_HI16
ENUMX
BFD_RELOC_MSP430_PREL31
ENUMX
BFD_RELOC_MSP430_SYM_DIFF
ENUMDOC
msp430 specific relocation codes

View File

@ -1,7 +1,5 @@
/* Generic target-file-type support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1990-2013 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -668,6 +666,7 @@ extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
extern const bfd_target bfd_elf32_mt_vec;
extern const bfd_target bfd_elf32_msp430_vec;
extern const bfd_target bfd_elf32_msp430_ti_vec;
extern const bfd_target bfd_elf32_nbigmips_vec;
extern const bfd_target bfd_elf32_nlittlemips_vec;
extern const bfd_target bfd_elf32_ntradbigmips_vec;
@ -1047,6 +1046,7 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf32_mn10300_vec,
&bfd_elf32_mt_vec,
&bfd_elf32_msp430_vec,
&bfd_elf32_msp430_ti_vec,
#ifdef BFD64
&bfd_elf32_nbigmips_vec,
&bfd_elf32_nlittlemips_vec,