summaryrefslogtreecommitdiff
path: root/bfd/libcoff.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
commit5cc3e8c93038d3751f890b302aef6af90aad9b9a (patch)
tree81376f75b953c57b37787e4509737b787eb5af5e /bfd/libcoff.h
parenta54692938ec6590f8afe96de6b8c378a60d496a5 (diff)
downloadgdb-5cc3e8c93038d3751f890b302aef6af90aad9b9a.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.h')
-rw-r--r--bfd/libcoff.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 229668ed586..fb3d5be73d9 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.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