From d6afba4b7d881f62bc632a9c2883ac0fdfd02e3a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 18 Aug 2004 09:51:29 +0000 Subject: [PATCH] * 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. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-ia64.c | 16 ++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 16f46c8ff8..ddf8fa77ec 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2004-08-18 Jakub Jelinek + + * 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 * as.c (MD_DEBUG_FORMAT_SELECTOR): Provide default definition. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index b48557d6d5..1d43e7773f 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 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. */ -- 2.34.1