summaryrefslogtreecommitdiff
path: root/bfd/libcoff-in.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-08-09 02:56:16 +0000
committerIan Lance Taylor <ian@airs.com>1999-08-09 02:56:16 +0000
commitbd004e1a7ab09eff31b8802ea10e1e62213bb704 (patch)
tree91370cd1b1609ceff35282b66c1d8253d9ce5666 /bfd/libcoff-in.h
parentf1b996685e5776d8573316df87022e02a4fd4a04 (diff)
downloadbinutils-redhat-bd004e1a7ab09eff31b8802ea10e1e62213bb704.tar.gz
1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
* libcoff-in.h (struct coff_section_alignment_entry): Define. * coffcode.h (coff_set_custom_section_alignment): New static function. (coff_section_alignment_table): New static array. (coff_new_section_hook): Use coff_set_customer_section_alignment. * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. * libcoff.h: Rebuild.
Diffstat (limited to 'bfd/libcoff-in.h')
-rw-r--r--bfd/libcoff-in.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index dae881f288..a0362ca9f1 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -1,5 +1,5 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -467,6 +467,41 @@ struct coff_final_link_info
struct internal_reloc *internal_relocs;
};
+/* Most COFF variants have no way to record the alignment of a
+ section. This struct is used to set a specific alignment based on
+ the name of the section. */
+
+struct coff_section_alignment_entry
+{
+ /* The section name. */
+ const char *name;
+
+ /* This is either (unsigned int) -1, indicating that the section
+ name must match exactly, or it is the number of letters which
+ must match at the start of the name. */
+ unsigned int comparison_length;
+
+ /* These macros may be used to fill in the first two fields in a
+ structure initialization. */
+#define COFF_SECTION_NAME_EXACT_MATCH(name) (name), ((unsigned int) -1)
+#define COFF_SECTION_NAME_PARTIAL_MATCH(name) (name), (sizeof (name) - 1)
+
+ /* Only use this entry if the default section alignment for this
+ target is at least that much (as a power of two). If this field
+ is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_min;
+
+ /* Only use this entry if the default section alignment for this
+ target is no greater than this (as a power of two). If this
+ field is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_max;
+
+#define COFF_ALIGNMENT_FIELD_EMPTY ((unsigned int) -1)
+
+ /* The desired alignment for this section (as a power of two). */
+ unsigned int alignment_power;
+};
+
extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern boolean _bfd_coff_link_hash_table_init