]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-ia64.c (start_unwind_section): Add linkonce_empty
authorJakub Jelinek <jakub@redhat.com>
Wed, 18 Aug 2004 09:51:29 +0000 (09:51 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 18 Aug 2004 09:51:29 +0000 (09:51 +0000)
argument, don't do anything if current section is not
.gnu.linkonce.t.* and linkonce_empty is set.
(generate_unwind_image, dot_endp): Adjust callers, call
start_unwind_section (*, 1) if nothing will be put into the
section.

gas/ChangeLog
gas/config/tc-ia64.c

index 16f46c8ff8374e15b412103522f7b97ebba4b4c5..ddf8fa77ec5401a068dd7a4e863a1062a5a48cbb 100644 (file)
@@ -1,3 +1,12 @@
+2004-08-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/tc-ia64.c (start_unwind_section): Add linkonce_empty
+       argument, don't do anything if current section is not
+       .gnu.linkonce.t.* and linkonce_empty is set.
+       (generate_unwind_image, dot_endp): Adjust callers, call
+       start_unwind_section (*, 1) if nothing will be put into the
+       section.
+
 2004-08-17  Nick Clifton  <nickc@redhat.com>
 
        * as.c (MD_DEBUG_FORMAT_SELECTOR): Provide default definition.
index b48557d6d52856323ec3acf0bd1bac9d30ba37f5..1d43e7773f4b2a46ad7b2d5dd7498a26398b159f 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of GAS, the GNU Assembler.
@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] =
   };
 
 static void
-start_unwind_section (const segT text_seg, int sec_index)
+start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty)
 {
   /*
     Use a slightly ugly scheme to derive the unwind section names from
@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_seg, int sec_index)
       prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
       suffix += sizeof (".gnu.linkonce.t.") - 1;
     }
+  else if (linkonce_empty)
+    return;
 
   prefix_len = strlen (prefix);
   suffix_len = strlen (suffix);
@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_seg)
       expressionS exp;
       bfd_reloc_code_real_type reloc;
 
-      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
+      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0);
 
       /* Make sure the section has 4 byte alignment for ILP32 and
         8 byte alignment for LP64.  */
@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_seg)
          unwind.personality_routine = 0;
        }
     }
+  else
+    start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1);
 
   free_saved_prologue_counts ();
   unwind.list = unwind.tail = unwind.current_entry = NULL;
@@ -4164,7 +4169,7 @@ dot_endp (dummy)
       subseg_set (md.last_text_seg, 0);
       unwind.proc_end = expr_build_dot ();
 
-      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
+      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0);
 
       /* Make sure that section has 4 byte alignment for ILP32 and
          8 byte alignment for LP64.  */
@@ -4204,6 +4209,9 @@ dot_endp (dummy)
                            bytes_per_address);
 
     }
+  else
+    start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1);
+
   subseg_set (saved_seg, saved_subseg);
 
   /* Parse names of main and alternate entry points and set symbol sizes.  */