This is the mail archive of the binutils@sources.redhat.com 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]

Pack Elf_External_Note


Something I mentioned four months ago.  Alan fixed the only place in BFD
that I know of which assumed the size of this structure, but the extra
packed attribute is a guard against future problems.

OK?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-01-29  Daniel Jacobowitz  <drow@mvista.com>

	* elf/external.h (Elf_External_Note): Add packed attribute.

Index: external.h
===================================================================
RCS file: /cvs/src/src/include/elf/external.h,v
retrieving revision 1.5
diff -u -p -r1.5 external.h
--- external.h	21 May 2003 00:55:15 -0000	1.5
+++ external.h	29 Jan 2004 15:47:49 -0000
@@ -154,7 +154,11 @@ typedef struct {
   unsigned char	descsz[4];		/* Size of the note descriptor */
   unsigned char	type[4];		/* Interpretation of the descriptor */
   char		name[1];		/* Start of the name+desc data */
-} Elf_External_Note;
+}
+#ifdef __GNUC__
+  __attribute__ ((packed))
+#endif
+  Elf_External_Note;
 
 /* Relocation Entries */
 typedef struct {


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