aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-mips.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-06-14 17:25:15 +0000
committerIan Lance Taylor <ian@airs.com>1993-06-14 17:25:15 +0000
commit9caf15da5176e2ca0c16884b239ef6308279bbbd (patch)
tree3c238db4791e394ca5afaf5e3a29d90bbd927982 /bfd/coff-mips.c
parentc76f7bb7c14b79066f3c51e6e90f535e7824053d (diff)
downloadgdb-9caf15da5176e2ca0c16884b239ef6308279bbbd.zip
gdb-9caf15da5176e2ca0c16884b239ef6308279bbbd.tar.gz
gdb-9caf15da5176e2ca0c16884b239ef6308279bbbd.tar.bz2
* coff-mips.c (ecoff_set_symbol_info): Constructor sections should
only be aligned to a 4 byte boundary.
Diffstat (limited to 'bfd/coff-mips.c')
-rw-r--r--bfd/coff-mips.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 4517558..eede88f 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -562,7 +562,7 @@ ecoff_styp_to_sec_flags (abfd, hdr)
/* For 386 COFF, at least, an unloadable text or data section is
actually a shared library section. */
if ((styp_flags & STYP_TEXT)
- || (stype_FLAGS & STYP_MIPS_INIT))
+ || (styp_flags & STYP_MIPS_INIT))
{
if (sec_flags & SEC_NEVER_LOAD)
sec_flags |= SEC_CODE | SEC_SHARED_LIBRARY;
@@ -1022,7 +1022,14 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, indirect_ptr_ptr)
/* Set up the constructor section to hold the reloc. */
section->flags = SEC_CONSTRUCTOR;
++section->reloc_count;
- section->alignment_power = 4;
+
+ /* Constructor sections must be rounded to a four byte
+ boundary (FIXME: assuming 32 bit entries). These are
+ not real sections--they are handled specially by the
+ linker--so the ECOFF 16 byte alignment restriction does
+ not apply. */
+ section->alignment_power = 2;
+
reloc_chain->next = section->constructor_chain;
section->constructor_chain = reloc_chain;