This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

readelf for H8/300 (16 bit EH)


I'm working on adding some dwarf2 stuff to H8/300, but readelf doesn't
support 16 bit frame addresses nicely yet.  Following on what's there,
I propose this patch.  Has anyone any experience with 16 bit frame
addresses?

	* readelf.c (process_section_headers): Add support for the
	H8/300 variants.

Index: readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.342
diff -p -U3 -r1.342 readelf.c
--- readelf.c	26 Apr 2006 15:43:17 -0000	1.342
+++ readelf.c	27 Jun 2006 21:47:38 -0000
@@ -3971,6 +3971,23 @@ process_section_headers (FILE *file)
 	  && find_section (".gcc_compiled_long32") == NULL)
 	eh_addr_size = 8;
       break;
+
+    case EM_H8_300:
+    case EM_H8_300H:
+      switch (elf_header.e_flags & EF_H8_MACH)
+	{
+	case E_H8_MACH_H8300:
+	case E_H8_MACH_H8300HN:
+	case E_H8_MACH_H8300SN:
+	case E_H8_MACH_H8300SXN:
+	  eh_addr_size = 2;
+	  break;
+	case E_H8_MACH_H8300H:
+	case E_H8_MACH_H8300S:
+	case E_H8_MACH_H8300SX:
+	  eh_addr_size = 4;
+	  break;
+	}
     }
 
 #define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]