https://sourceware.org/bugzilla/show_bug.cgi?id=28233
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #0) > I've found no similar workaround for the missing SO entry problem, so I > wrote a patch for this. Tentative gas patch: ... diff --git a/gas/read.c b/gas/read.c index 7bf52f11218..d75815fb99a 100644 --- a/gas/read.c +++ b/gas/read.c @@ -248,6 +248,7 @@ static segT get_known_segmented_expression (expressionS * expP); static void pobegin (void); static size_t get_non_macro_line_sb (sb *); static void generate_file_debug (void); +static void generate_file_debug_end (void); static char *_find_end_of_line (char *, int, int, int); ^L void @@ -1363,6 +1364,8 @@ read_a_source_file (const char *name) } quit: + generate_file_debug_end (); + symbol_set_value_now (&dot_symbol); #ifdef HANDLE_BUNDLE @@ -6066,6 +6069,13 @@ generate_file_debug (void) stabs_generate_asm_file (); } +static void +generate_file_debug_end (void) +{ + if (debug_type == DEBUG_STABS) + stabs_generate_asm_file_end (); +} + /* Output line number debugging information for the current source line. */ void diff --git a/gas/read.h b/gas/read.h index eebdc4e7452..651f0701bf0 100644 --- a/gas/read.h +++ b/gas/read.h @@ -144,6 +144,7 @@ extern void read_print_statistics (FILE *); extern char *read_symbol_name (void); extern unsigned sizeof_leb128 (valueT, int); extern void stabs_generate_asm_file (void); +extern void stabs_generate_asm_file_end (void); extern void stabs_generate_asm_lineno (void); extern void stabs_generate_asm_func (const char *, const char *); extern void stabs_generate_asm_endfunc (const char *, const char *); diff --git a/gas/stabs.c b/gas/stabs.c index 73d1361423c..946831d9c18 100644 --- a/gas/stabs.c +++ b/gas/stabs.c @@ -502,6 +502,13 @@ stabs_generate_asm_file (void) generate_asm_file (N_SO, file); } +void +stabs_generate_asm_file_end (void) +{ + subseg_set (text_section, 0); + generate_asm_file (N_SO, ""); +} + /* Generate stabs debugging information to denote the source file. TYPE is one of N_SO, N_SOL. */ ... -- You are receiving this mail because: You are on the CC list for the bug.