aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-12-06 14:36:41 +0000
committerNick Clifton <nickc@redhat.com>2006-12-06 14:36:41 +0000
commit4fd454c89d63c73fd5e99ce5eb2a3174fcfd4f5d (patch)
tree7d4281098dd36db5421629a67e371ea6b3fc3650 /include
parent4ae4f4fb150a246ec9232d07cf754f9691feb7c9 (diff)
downloadgdb-4fd454c89d63c73fd5e99ce5eb2a3174fcfd4f5d.zip
gdb-4fd454c89d63c73fd5e99ce5eb2a3174fcfd4f5d.tar.gz
gdb-4fd454c89d63c73fd5e99ce5eb2a3174fcfd4f5d.tar.bz2
Define ATTRIBUTE_PACKED and use as necessary.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/ansidecl.h6
-rw-r--r--include/coff/ChangeLog7
-rw-r--r--include/coff/external.h6
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/external.h6
6 files changed, 27 insertions, 8 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index e7e2895..7f3966c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * ansidecl.h (ATTRIBUTE_PACKED): Define.
+
2006-11-30 Andrew Stubbs <andrew.stubbs@st.com>
J"orn Rennecke <joern.rennecke@st.com>
diff --git a/include/ansidecl.h b/include/ansidecl.h
index a1a765d..793b1e6 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -361,6 +361,12 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 3.0 */
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
+/* Useful for structures whoes layout must much some binary specification
+ regardless of the alignment and padding qualities of the compiler. */
+#ifndef ATTRIBUTE_PACKED
+# define ATTRIBUTE_PACKED __attribute__ ((packed))
+#endif
+
/* We use __extension__ in some places to suppress -pedantic warnings
about GCC extensions. This feature didn't work properly before
gcc 2.8. */
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 60a8587..b8af0fe 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,10 @@
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED.
+ (struct external_syment): Likewise.
+ (union external_auxent): Likewise.
+
2006-11-14 Phil Lello <phil.lello@homecall.co.uk>
* pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and
diff --git a/include/coff/external.h b/include/coff/external.h
index e38fb1b..8dabc8a 100644
--- a/include/coff/external.h
+++ b/include/coff/external.h
@@ -50,7 +50,7 @@ typedef struct external_aouthdr
char entry[4]; /* entry pt. */
char text_start[4]; /* base of text used for this file */
char data_start[4]; /* base of data used for this file */
- }
+ } ATTRIBUTE_PACKED
AOUTHDR;
#define AOUTHDRSZ 28
@@ -164,7 +164,7 @@ struct external_syment
char e_type[2];
char e_sclass[1];
char e_numaux[1];
-};
+} ATTRIBUTE_PACKED ;
#define SYMENT struct external_syment
#define SYMESZ 18
@@ -256,7 +256,7 @@ union external_auxent
char x_tvlen[2]; /* length of .tv */
char x_tvran[2][2]; /* tv range */
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-};
+} ATTRIBUTE_PACKED ;
#define AUXENT union external_auxent
#define AUXESZ 18
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 3a661cb..47d9d47 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED.
+
2006-10-28 Richard Sandiford <richard@codesourcery.com>
* mips.h (R_MIPS_GLOB_DAT): Define
diff --git a/include/elf/external.h b/include/elf/external.h
index 5985e94..21450f0 100644
--- a/include/elf/external.h
+++ b/include/elf/external.h
@@ -245,11 +245,7 @@ typedef struct {
typedef struct {
unsigned char vs_vers[2];
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
- Elf_External_Versym;
+} ATTRIBUTE_PACKED Elf_External_Versym;
/* Structure for syminfo section. */
typedef struct