diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 15 | ||||
-rw-r--r-- | binutils/MAINTAINERS | 2 | ||||
-rw-r--r-- | binutils/NEWS | 2 | ||||
-rw-r--r-- | binutils/readelf.c | 24 |
4 files changed, 43 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2eedde7..9a0701b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,18 @@ +2013-02-06 Sandra Loosemore <sandra@codesourcery.com> + Andrew Jenner <andrew@codesourcery.com> + + Based on patches from Altera Corporation. + + * 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. + 2013-01-29 Xi Wang <xi.wang@gmail.com> * readelf.c (process_version_sections): Fix overflow checks to diff --git a/binutils/MAINTAINERS b/binutils/MAINTAINERS index f887dcd..2a1ac61 100644 --- a/binutils/MAINTAINERS +++ b/binutils/MAINTAINERS @@ -107,6 +107,8 @@ responsibility among the other maintainers. Moxie Anthony Green <green@moxielogic.com> MSP430 Dmitry Diky <diwil@spec.ru> NetBSD support Matt Thomas <matt@netbsd.org> + Nios II Sandra Loosemore <sandra@codesourcery.com> + Nios II Andrew Jenner <andrew@codesourcery.com> PPC Geoff Keating <geoffk@geoffk.org> PPC Alan Modra <amodra@gmail.com> PPC vector ext Aldy Hernandez <aldyh@redhat.com> diff --git a/binutils/NEWS b/binutils/NEWS index 2d36dbc..9140043 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,7 @@ -*- text -*- +* Add support for Altera Nios II. + Changes in 2.23: * Add support for the VLE extension to the PowerPC architecture. diff --git a/binutils/readelf.c b/binutils/readelf.c index ae211a7..7710079 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -153,6 +153,8 @@ #include "elf/xstormy16.h" #include "elf/xtensa.h" +#include "elf/nios2.h" + #include "getopt.h" #include "libiberty.h" #include "safe-ctype.h" @@ -1288,6 +1290,10 @@ dump_relocations (FILE * file, case EM_XGATE: rtype = elf_xgate_reloc_type (type); break; + + case EM_ALTERA_NIOS2: + rtype = elf_nios2_reloc_type (type); + break; } if (rtype == NULL) @@ -1687,6 +1693,17 @@ get_tic6x_dynamic_type (unsigned long type) } static const char * +get_nios2_dynamic_type (unsigned long type) +{ + switch (type) + { + case DT_NIOS2_GP: return "NIOS2_GP"; + default: + return NULL; + } +} + +static const char * get_dynamic_type (unsigned long type) { static char buff[64]; @@ -1800,6 +1817,9 @@ get_dynamic_type (unsigned long type) case EM_TI_C6000: result = get_tic6x_dynamic_type (type); break; + case EM_ALTERA_NIOS2: + result = get_nios2_dynamic_type (type); + break; default: result = NULL; break; @@ -10074,6 +10094,7 @@ is_32bit_abs_reloc (unsigned int reloc_type) case EM_MT: return reloc_type == 2; /* R_MT_32. */ case EM_ALTERA_NIOS2: + return reloc_type == 12; /* R_NIOS2_BFD_RELOC_32. */ case EM_NIOS32: return reloc_type == 1; /* R_NIOS_32. */ case EM_OPENRISC: @@ -10324,6 +10345,7 @@ is_16bit_abs_reloc (unsigned int reloc_type) case EM_MSP430_OLD: return reloc_type == 5; /* R_MSP430_16_BYTE. */ case EM_ALTERA_NIOS2: + return reloc_type == 13; /* R_NIOS2_BFD_RELOC_16. */ case EM_NIOS32: return reloc_type == 9; /* R_NIOS_16. */ case EM_TI_C6000: @@ -10380,6 +10402,8 @@ is_none_reloc (unsigned int reloc_type) case EM_TILEPRO: /* R_TILEPRO_NONE. */ case EM_XC16X: case EM_C166: /* R_XC16X_NONE. */ + case EM_ALTERA_NIOS2: /* R_NIOS2_NONE. */ + case EM_NIOS32: /* R_NIOS_NONE. */ return reloc_type == 0; case EM_AARCH64: return reloc_type == 0 || reloc_type == 256; |