From f4236fe4560a39155dd1e633f88914b1ac28d824 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 25 Jan 2008 21:08:17 +0000 Subject: * readelf.c (process_section_headers): Add m16c handler. (is_16bit_abs_reloc): Recognize R_M32C_16. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) 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 + + * readelf.c (process_section_headers): Add m16c handler. + (is_16bit_abs_reloc): Recognize R_M32C_16. + 2008-01-25 Kai Tietz * 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. */ -- cgit v1.1