summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2008-01-25 21:08:17 +0000
committerDJ Delorie <dj@delorie.com>2008-01-25 21:08:17 +0000
commit68e6aeb0006aae708866227bee69320eec8cd714 (patch)
tree3414ea0b9ed8be7da57b0f39949d6ed6afb2dba2 /binutils
parent8334dffb533c48262fbe0af4fd2748b6e4f72e38 (diff)
downloadbinutils-redhat-68e6aeb0006aae708866227bee69320eec8cd714.tar.gz
* 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 3a4ec73bf3..a0d3c71472 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 807b0f1f26..20a7681f41 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. */