Skip to content

Commit

Permalink
2013-02-06 Sandra Loosemore <sandra@codesourcery.com>
Browse files Browse the repository at this point in the history
            Andrew Jenner <andrew@codesourcery.com>

	Based on patches from Altera Corporation.

	bfd/
	* Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
	(ALL_MACHINES_CFILES): Add cpu-nios2.c.
	(BFD_BACKENDS): Add elf32-nios2.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
	* Makefile.in: Regenerated.
	* configure.in: Add entries for bfd_elf32_bignios2_vec and
	bfd_elf32_littlenios2_vec.
	* configure: Regenerated.
	* config.bfd: Add cases for nios2.
	* archures.c (enum bfd_architecture): Add bfd_arch_nios2.
	(bfd_mach_nios2): Define.
	(bfd_nios2_arch): Declare.
	(bfd_archures_list): Add bfd_nios2_arch.
	* targets.c (bfd_elf32_bignios2_vec): Declare.
	(bfd_elf32_littlenios2_vec): Declare.
	(_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
	bfd_elf32_littlenios2_vec.
	* elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
	* reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
	* cpu-nios2.c: New file.
	* elf32-nios2.c: New file.

	opcodes/
	* Makefile.am (TARGET_LIBOPCODES_CFILES): Add nios2-dis.c and
	nios2-opc.c.
	* Makefile.in: Regenerated.
	* configure.in: Add case for bfd_nios2_arch.
	* configure: Regenerated.
	* disassemble.c (ARCH_nios2): Define.
	(disassembler): Add case for bfd_arch_nios2.
	* nios2-dis.c: New file.
	* nios2-opc.c: New file.

	include/
	* dis-asm.h (print_insn_big_nios2): Declare.
	(print_insn_little_nios2): Declare.

	include/elf
	* nios2.h: New file.

	include/opcode/
	* nios2.h: New file.

	gas/
	* Makefile.am (TARGET_CPU_CFILES): Add config/tc-nios2.c.
	(TARGET_CPU_HFILES): Add config/tc-nios2.h.
	* Makefile.in: Regenerated.
	* configure.tgt: Add case for nios2*-linux*.
	* config/obj-elf.c: Conditionally include elf/nios2.h.
	* config/tc-nios2.c: New file.
	* config/tc-nios2.h: New file.
	* doc/Makefile.am (CPU_DOCS): Add c-nios2.texi.
	* doc/Makefile.in: Regenerated.
	* doc/all.texi: Set NIOSII.
	* doc/as.texinfo (Overview): Add Nios II options.
	(Machine Dependencies): Include c-nios2.texi.
	* doc/c-nios2.texi: New file.
	* NEWS: Note Altera Nios II support.

	gas/testsuite/
	* gas/nios2/add.d: New.
	* gas/nios2/add.s: New.
	* gas/nios2/align_fill.d: New.
	* gas/nios2/align_fill.s: New.
	* gas/nios2/align_text.d: New.
	* gas/nios2/align_text.s: New.
	* gas/nios2/and.d: New.
	* gas/nios2/and.s: New.
	* gas/nios2/branch.d: New.
	* gas/nios2/branch.s: New.
	* gas/nios2/break.d: New.
	* gas/nios2/break.s: New.
	* gas/nios2/bret.d: New.
	* gas/nios2/bret.s: New.
	* gas/nios2/cache.d: New.
	* gas/nios2/cache.s: New.
	* gas/nios2/call26.d: New.
	* gas/nios2/call26.s: New.
	* gas/nios2/call.d: New.
	* gas/nios2/call.s: New.
	* gas/nios2/cmp.d: New.
	* gas/nios2/cmp.s: New.
	* gas/nios2/comments.d: New.
	* gas/nios2/comments.s: New.
	* gas/nios2/complex.d: New.
	* gas/nios2/complex.s: New.
	* gas/nios2/ctl.d: New.
	* gas/nios2/ctl.s: New.
	* gas/nios2/custom.d: New.
	* gas/nios2/custom.s: New.
	* gas/nios2/etbt.d: New.
	* gas/nios2/etbt.s: New.
	* gas/nios2/flushda.d: New.
	* gas/nios2/flushda.s: New.
	* gas/nios2/illegal.l: New.
	* gas/nios2/illegal.s: New.
	* gas/nios2/jmp.d: New.
	* gas/nios2/jmp.s: New.
	* gas/nios2/ldb.d: New.
	* gas/nios2/ldb.s: New.
	* gas/nios2/ldh.d: New.
	* gas/nios2/ldh.s: New.
	* gas/nios2/ldw.d: New.
	* gas/nios2/ldw.s: New.
	* gas/nios2/lineseparator.d: New.
	* gas/nios2/lineseparator.s: New.
	* gas/nios2/mov.d: New.
	* gas/nios2/movia.d: New.
	* gas/nios2/movia.s: New.
	* gas/nios2/movi.d: New.
	* gas/nios2/movi.s: New.
	* gas/nios2/mov.s: New.
	* gas/nios2/mul.d: New.
	* gas/nios2/mul.s: New.
	* gas/nios2/nios2.exp: New.
	* gas/nios2/nor.d: New.
	* gas/nios2/nor.s: New.
	* gas/nios2/or.d: New.
	* gas/nios2/or.s: New.
	* gas/nios2/ret.d: New.
	* gas/nios2/ret.s: New.
	* gas/nios2/rol.d: New.
	* gas/nios2/rol.s: New.
	* gas/nios2/rotate.d: New.
	* gas/nios2/rotate.s: New.
	* gas/nios2/stb.d: New.
	* gas/nios2/stb.s: New.
	* gas/nios2/sth.d: New.
	* gas/nios2/sth.s: New.
	* gas/nios2/stw.d: New.
	* gas/nios2/stw.s: New.
	* gas/nios2/sub.d: New.
	* gas/nios2/sub.s: New.
	* gas/nios2/sync.d: New.
	* gas/nios2/sync.s: New.
	* gas/nios2/trap.d: New.
	* gas/nios2/trap.s: New.
	* gas/nios2/tret.d: New.
	* gas/nios2/tret.s: New.
	* gas/nios2/warn_noat.l: New.
	* gas/nios2/warn_noat.s: New.
	* gas/nios2/warn_nobreak.l: New.
	* gas/nios2/warn_nobreak.s: New.
	* gas/nios2/xor.d: New.
	* gas/nios2/xor.s: New.

	ld/
	* Makefile.am (enios2elf.c): New rule.
	* Makefile.in: Regenerated.
	* configure.tgt: Add case for nios2*-*-*.
	* emulparams/nios2elf.sh: New file.
	* NEWS: Note Altera Nios II support.

	ld/testsuite/
	* ld-nios2/emit-relocs-1a.s: New.
	* ld-nios2/emit-relocs-1b.s: New.
	* ld-nios2/emit-relocs-1.d: New.
	* ld-nios2/emit-relocs-1.ld: New.
	* ld-nios2/gprel.d: New.
	* ld-nios2/gprel.s: New.
	* ld-nios2/hilo16.d: New.
	* ld-nios2/hilo16.s: New.
	* ld-nios2/hilo16_symbol.s: New.
	* ld-nios2/imm5.d: New.
	* ld-nios2/imm5.s: New.
	* ld-nios2/imm5_symbol.s: New.
	* ld-nios2/nios2.exp: New.
	* ld-nios2/pcrel16.d: New.
	* ld-nios2/pcrel16_label.s: New.
	* ld-nios2/pcrel16.s: New.
	* ld-nios2/relax_callr.d: New.
	* ld-nios2/relax_callr.ld: New.
	* ld-nios2/relax_callr.s: New.
	* ld-nios2/relax_cjmp.d: New.
	* ld-nios2/relax_cjmp.s: New.
	* ld-nios2/relax_jmp.ld: New.
	* ld-nios2/relax_section.d: New.
	* ld-nios2/relax_section.s: New.
	* ld-nios2/relax_ujmp.d: New.
	* ld-nios2/relax_ujmp.s: New.
	* ld-nios2/reloc.d: New.
	* ld-nios2/reloc.s: New.
	* ld-nios2/reloc_symbol.s: New.
	* ld-nios2/s16.d: New.
	* ld-nios2/s16.s: New.
	* ld-nios2/s16_symbol.s: New.
	* ld-nios2/u16.d: New.
	* ld-nios2/u16.s: New.
	* ld-nios2/u16_symbol.s: New.
	* ld-elf/indirect.exp: Skip on targets that don't support
	-shared -fPIC.
	* ld-elfcomm/elfcomm.exp: Build with -G0 for nios2.
	* ld-plugin/lto.exp: Skip shared library tests on targets that
	don't support them.  Skip execution tests on non-native targets.

	binutils/
	* readelf.c: Include elf/nios2.h.
	(dump_relocations): Add case for EM_ALTERA_NIOS2.
	(get_nios2_dynamic_type): New.
	(get_dynamic_type): Add case for EM_ALTERA_NIOS2.
	(is_32bit_abs_reloc): Fix EM_ALTERA_NIOS2 case.
	(is_16bit_abs_reloc): Likewise.
	(is_none_reloc): Add EM_ALTERA_NIOS2 and EM_NIOS32 cases.
	* NEWS: Note Altera Nios II support.
	* MAINTAINERS: Add Nios II maintainers.
  • Loading branch information
SandraLoosemore committed Feb 6, 2013
1 parent 574b0b3 commit 36591ba
Show file tree
Hide file tree
Showing 176 changed files with 13,183 additions and 4 deletions.
29 changes: 29 additions & 0 deletions bfd/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
2013-02-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner <andrew@codesourcery.com>

Based on patches from Altera Corporation.

* Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
(ALL_MACHINES_CFILES): Add cpu-nios2.c.
(BFD_BACKENDS): Add elf32-nios2.lo.
(BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
* Makefile.in: Regenerated.
* configure.in: Add entries for bfd_elf32_bignios2_vec and
bfd_elf32_littlenios2_vec.
* configure: Regenerated.
* config.bfd: Add cases for nios2.
* archures.c (enum bfd_architecture): Add bfd_arch_nios2.
(bfd_mach_nios2): Define.
(bfd_nios2_arch): Declare.
(bfd_archures_list): Add bfd_nios2_arch.
* targets.c (bfd_elf32_bignios2_vec): Declare.
(bfd_elf32_littlenios2_vec): Declare.
(_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
bfd_elf32_littlenios2_vec.
* elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
* reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
* bfd-in2.h: Regenerated.
* libbfd.h: Regenerated.
* cpu-nios2.c: New file.
* elf32-nios2.c: New file.

2013-02-06 Alan Modra <amodra@gmail.com>

* elf32-arm.c (elf32_arm_final_link_relocate): Only test for
Expand Down
4 changes: 4 additions & 0 deletions bfd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ ALL_MACHINES = \
cpu-moxie.lo \
cpu-msp430.lo \
cpu-mt.lo \
cpu-nios2.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-or32.lo \
Expand Down Expand Up @@ -220,6 +221,7 @@ ALL_MACHINES_CFILES = \
cpu-msp430.c \
cpu-mt.c \
cpu-ns32k.c \
cpu-nios2.c \
cpu-openrisc.c \
cpu-or32.c \
cpu-pdp11.c \
Expand Down Expand Up @@ -348,6 +350,7 @@ BFD32_BACKENDS = \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
elf32-nios2.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
Expand Down Expand Up @@ -537,6 +540,7 @@ BFD32_BACKENDS_CFILES = \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
elf32-nios2.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
Expand Down
6 changes: 6 additions & 0 deletions bfd/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ ALL_MACHINES = \
cpu-moxie.lo \
cpu-msp430.lo \
cpu-mt.lo \
cpu-nios2.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-or32.lo \
Expand Down Expand Up @@ -521,6 +522,7 @@ ALL_MACHINES_CFILES = \
cpu-msp430.c \
cpu-mt.c \
cpu-ns32k.c \
cpu-nios2.c \
cpu-openrisc.c \
cpu-or32.c \
cpu-pdp11.c \
Expand Down Expand Up @@ -650,6 +652,7 @@ BFD32_BACKENDS = \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
elf32-nios2.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
Expand Down Expand Up @@ -839,6 +842,7 @@ BFD32_BACKENDS_CFILES = \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
elf32-nios2.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
Expand Down Expand Up @@ -1345,6 +1349,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-moxie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-msp430.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nios2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or32.Plo@am__quote@
Expand Down Expand Up @@ -1433,6 +1438,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-moxie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nios2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@
Expand Down
4 changes: 4 additions & 0 deletions bfd/archures.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ DESCRIPTION
.#define bfd_mach_tilegx32 2
. bfd_arch_aarch64, {* AArch64 *}
.#define bfd_mach_aarch64 0
. bfd_arch_nios2,
.#define bfd_mach_nios2 0
. bfd_arch_last
. };
*/
Expand Down Expand Up @@ -560,6 +562,7 @@ extern const bfd_arch_info_type bfd_mn10300_arch;
extern const bfd_arch_info_type bfd_moxie_arch;
extern const bfd_arch_info_type bfd_msp430_arch;
extern const bfd_arch_info_type bfd_mt_arch;
extern const bfd_arch_info_type bfd_nios2_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_or32_arch;
Expand Down Expand Up @@ -648,6 +651,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_moxie_arch,
&bfd_msp430_arch,
&bfd_mt_arch,
&bfd_nios2_arch,
&bfd_ns32k_arch,
&bfd_openrisc_arch,
&bfd_or32_arch,
Expand Down
38 changes: 38 additions & 0 deletions bfd/bfd-in2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,8 @@ enum bfd_architecture
#define bfd_mach_tilegx32 2
bfd_arch_aarch64, /* AArch64 */
#define bfd_mach_aarch64 0
bfd_arch_nios2,
#define bfd_mach_nios2 0
bfd_arch_last
};

Expand Down Expand Up @@ -4913,6 +4915,42 @@ a matching LO8XG part. */
BFD_RELOC_MSP430_2X_PCREL,
BFD_RELOC_MSP430_RL_PCREL,

/* Relocations used by the Altera Nios II core. */
BFD_RELOC_NIOS2_S16,
BFD_RELOC_NIOS2_U16,
BFD_RELOC_NIOS2_CALL26,
BFD_RELOC_NIOS2_IMM5,
BFD_RELOC_NIOS2_CACHE_OPX,
BFD_RELOC_NIOS2_IMM6,
BFD_RELOC_NIOS2_IMM8,
BFD_RELOC_NIOS2_HI16,
BFD_RELOC_NIOS2_LO16,
BFD_RELOC_NIOS2_HIADJ16,
BFD_RELOC_NIOS2_GPREL,
BFD_RELOC_NIOS2_UJMP,
BFD_RELOC_NIOS2_CJMP,
BFD_RELOC_NIOS2_CALLR,
BFD_RELOC_NIOS2_ALIGN,
BFD_RELOC_NIOS2_GOT16,
BFD_RELOC_NIOS2_CALL16,
BFD_RELOC_NIOS2_GOTOFF_LO,
BFD_RELOC_NIOS2_GOTOFF_HA,
BFD_RELOC_NIOS2_PCREL_LO,
BFD_RELOC_NIOS2_PCREL_HA,
BFD_RELOC_NIOS2_TLS_GD16,
BFD_RELOC_NIOS2_TLS_LDM16,
BFD_RELOC_NIOS2_TLS_LDO16,
BFD_RELOC_NIOS2_TLS_IE16,
BFD_RELOC_NIOS2_TLS_LE16,
BFD_RELOC_NIOS2_TLS_DTPMOD,
BFD_RELOC_NIOS2_TLS_DTPREL,
BFD_RELOC_NIOS2_TLS_TPREL,
BFD_RELOC_NIOS2_COPY,
BFD_RELOC_NIOS2_GLOB_DAT,
BFD_RELOC_NIOS2_JUMP_SLOT,
BFD_RELOC_NIOS2_RELATIVE,
BFD_RELOC_NIOS2_GOTOFF,

/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
BFD_RELOC_IQ2000_OFFSET_21,
Expand Down
16 changes: 16 additions & 0 deletions bfd/config.bfd
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
microblaze*) targ_archs=bfd_microblaze_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
nios2*) targ_archs=bfd_nios2_arch ;;
or32*) targ_archs=bfd_or32_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
Expand Down Expand Up @@ -1144,6 +1145,21 @@ case "${targ}" in
targ_underscore=yes
;;

nios2eb-*-*)
targ_defvec=bfd_elf32_bignios2_vec
targ_selvecs=bfd_elf32_littlenios2_vec
;;

nios2el-*-*)
targ_defvec=bfd_elf32_littlenios2_vec
targ_selvecs=bfd_elf32_bignios2_vec
;;

nios2-*-*)
targ_defvec=bfd_elf32_littlenios2_vec
targ_selvecs=bfd_elf32_bignios2_vec
;;

openrisc-*-elf)
targ_defvec=bfd_elf32_openrisc_vec
;;
Expand Down
2 changes: 2 additions & 0 deletions bfd/configure
Original file line number Diff line number Diff line change
Expand Up @@ -15228,6 +15228,7 @@ do
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
Expand Down Expand Up @@ -15270,6 +15271,7 @@ do
bfd_elf32_littlemips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
Expand Down
2 changes: 2 additions & 0 deletions bfd/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ do
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
Expand Down Expand Up @@ -767,6 +768,7 @@ do
bfd_elf32_littlemips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
Expand Down
44 changes: 44 additions & 0 deletions bfd/cpu-nios2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* BFD support for the Altera Nios II processor.
Copyright (C) 2012, 2013 Free Software Foundation, Inc.
Contributed by Nigel Gray (ngray@altera.com).
Contributed by Mentor Graphics, Inc.
This file is part of BFD, the Binary File Descriptor library.
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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */

#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"

#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
{ \
BITS_WORD, /* bits in a word */ \
BITS_ADDR, /* bits in an address */ \
8, /* 8 bits in a byte */ \
bfd_arch_nios2, \
NUMBER, \
"nios2", \
PRINT, \
3, \
DEFAULT, \
bfd_default_compatible, \
bfd_default_scan, \
bfd_arch_default_fill, \
NEXT \
}

const bfd_arch_info_type bfd_nios2_arch = N (32, 32, 0, "nios2", TRUE, NULL);
1 change: 1 addition & 0 deletions bfd/elf-bfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ enum elf_target_id
MICROBLAZE_ELF_DATA,
MIPS_ELF_DATA,
MN10300_ELF_DATA,
NIOS2_ELF_DATA,
PPC32_ELF_DATA,
PPC64_ELF_DATA,
S390_ELF_DATA,
Expand Down
Loading

0 comments on commit 36591ba

Please sign in to comment.