aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-08-18 09:51:29 +0000
committerJakub Jelinek <jakub@redhat.com>2004-08-18 09:51:29 +0000
commitd6afba4b7d881f62bc632a9c2883ac0fdfd02e3a (patch)
tree82d02c44737cb5861c02569636bb617f344f2e93 /gas/config/tc-ia64.c
parent271d0fc399a1d41cee9d2f34fbb15e18e008a6bb (diff)
downloadgdb-d6afba4b7d881f62bc632a9c2883ac0fdfd02e3a.zip
gdb-d6afba4b7d881f62bc632a9c2883ac0fdfd02e3a.tar.gz
gdb-d6afba4b7d881f62bc632a9c2883ac0fdfd02e3a.tar.bz2
* 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.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r--gas/config/tc-ia64.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index b48557d..1d43e77 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -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. */