* Makefile.in (tmp-ld-decode): Fix dependencies.
[deliverable/binutils-gdb.git] / gas / config / obj-elf.c
index d015dab2ea3fd9b93ca44b0f915fb4060a9d1e82..f922149cae0d918e6a33e9df0d441c1752d1a8e2 100644 (file)
 #include "elf/i370.h"
 #endif
 
+#ifdef TC_I386
+#include "elf/x86-64.h"
+#endif
+
 static void obj_elf_line (int);
 static void obj_elf_size (int);
 static void obj_elf_type (int);
@@ -111,6 +115,7 @@ static const pseudo_typeS elf_pseudo_table[] =
   /* These are used for dwarf2.  */
   { "file", (void (*) (int)) dwarf2_directive_file, 0 },
   { "loc",  dwarf2_directive_loc,  0 },
+  { "loc_mark_labels", dwarf2_directive_loc_mark_labels, 0 },
 
   /* We need to trap the section changing calls to handle .previous.  */
   {"data", obj_elf_data, 0},
@@ -174,6 +179,8 @@ static const pseudo_typeS ecoff_debug_pseudo_table[] =
 
 /* This is called when the assembler starts.  */
 
+asection *elf_com_section_ptr;
+
 void
 elf_begin (void)
 {
@@ -186,6 +193,7 @@ elf_begin (void)
   symbol_table_insert (section_symbol (s));
   s = bfd_get_section_by_name (stdoutput, BSS_SECTION_NAME);
   symbol_table_insert (section_symbol (s));
+  elf_com_section_ptr = bfd_com_section_ptr;
 }
 
 void
@@ -270,7 +278,7 @@ elf_file_symbol (const char *s, int appfile)
 /* Called from read.c:s_comm after we've parsed .comm symbol, size.
    Parse a possible alignment value.  */
 
-static symbolS *
+symbolS *
 elf_common_parse (int ignore ATTRIBUTE_UNUSED, symbolS *symbolP, addressT size)
 {
   addressT align = 0;
@@ -334,7 +342,7 @@ elf_common_parse (int ignore ATTRIBUTE_UNUSED, symbolS *symbolP, addressT size)
       S_SET_VALUE (symbolP, size);
       S_SET_ALIGN (symbolP, align);
       S_SET_EXTERNAL (symbolP);
-      S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
+      S_SET_SEGMENT (symbolP, elf_com_section_ptr);
     }
 
   symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
@@ -569,7 +577,16 @@ obj_elf_change_section (const char *name,
                 .section .init_array,"aw",@progbits
 
                 for __attribute__ ((section (".init_array"))).
+                "@progbits" is incorrect.  Also for x86-64 large bss
+                sections, gcc, as of 2005-07-06, will emit
+
+                .section .lbss,"aw",@progbits
+
                 "@progbits" is incorrect.  */
+#ifdef TC_I386
+             && (bed->s->arch_size != 64
+                 || !(ssect->attr & SHF_X86_64_LARGE))
+#endif
              && ssect->type != SHT_INIT_ARRAY
              && ssect->type != SHT_FINI_ARRAY
              && ssect->type != SHT_PREINIT_ARRAY)
This page took 0.055821 seconds and 4 git commands to generate.