aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2008-01-25 21:08:17 +0000
committerDJ Delorie <dj@redhat.com>2008-01-25 21:08:17 +0000
commitf4236fe4560a39155dd1e633f88914b1ac28d824 (patch)
treebea066df68e632906ee17d726025585d53016135 /binutils
parentc006d697e48452ca44388354d7ce9ade74558039 (diff)
downloadgdb-f4236fe4560a39155dd1e633f88914b1ac28d824.zip
gdb-f4236fe4560a39155dd1e633f88914b1ac28d824.tar.gz
gdb-f4236fe4560a39155dd1e633f88914b1ac28d824.tar.bz2
* readelf.c (process_section_headers): Add m16c handler.
(is_16bit_abs_reloc): Recognize R_M32C_16.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3a4ec73..a0d3c71 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-25 DJ Delorie <dj@redhat.com>
+
+ * readelf.c (process_section_headers): Add m16c handler.
+ (is_16bit_abs_reloc): Recognize R_M32C_16.
+
2008-01-25 Kai Tietz <kai.tietz@onevision.com>
* prdbg.c: Correct formatter style use.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 807b0f1..20a7681 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4162,6 +4162,16 @@ process_section_headers (FILE *file)
eh_addr_size = 4;
break;
}
+ break;
+
+ case EM_M32C:
+ switch (elf_header.e_flags & EF_M32C_CPU_MASK)
+ {
+ case EF_M32C_CPU_M16C:
+ eh_addr_size = 2;
+ break;
+ }
+ break;
}
#define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \
@@ -8196,6 +8206,8 @@ is_16bit_abs_reloc (unsigned int reloc_type)
case EM_IP2K_OLD:
case EM_IP2K:
return reloc_type == 1; /* R_IP2K_16. */
+ case EM_M32C:
+ return reloc_type == 1; /* R_M32C_16 */
case EM_MSP430_OLD:
case EM_MSP430:
return reloc_type == 5; /* R_MSP430_16_BYTE. */