summaryrefslogtreecommitdiffstats
path: root/include/coff/ti.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-12-23 10:59:56 +0000
committerNick Clifton <nickc@redhat.com>2008-12-23 10:59:56 +0000
commita432f501008457d23ffe41e63f1549e0ef5bccd1 (patch)
tree0bb7151e22bc95e3b5c2d87b495a8e5f9bb7bca8 /include/coff/ti.h
parent15be19c17c8241b88463685a948bb2899e19889c (diff)
downloadcygnal-a432f501008457d23ffe41e63f1549e0ef5bccd1.tar.gz
cygnal-a432f501008457d23ffe41e63f1549e0ef5bccd1.tar.bz2
cygnal-a432f501008457d23ffe41e63f1549e0ef5bccd1.zip
* coffcode.h (coff_write_object_contents): Always initialise
section.s_page. * ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define.
Diffstat (limited to 'include/coff/ti.h')
-rw-r--r--include/coff/ti.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/coff/ti.h b/include/coff/ti.h
index 86f7a1339..e0e17293d 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -321,6 +321,15 @@ struct external_scnhdr {
} \
while (0)
+/* The entire scnhdr may not be assigned.
+ Ensure that everything is initialized. */
+#define COFF_ADJUST_SCNHDR_OUT_PRE(ABFD, INT, EXT) \
+ do \
+ { \
+ memset((EXT), 0, sizeof (SCNHDR)); \
+ } \
+ while (0)
+
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
Due to different sized v0/v1/v2 section headers, we have to re-write these