Dave Korn wrote: >> FAIL: gcc.c-torture/compile/20011119-1.c (test for excess errors) >> Excess errors: >> /win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/cccnrdgl.s:13: Error: junk at end of >> line, first unrecognized character is `*' > > Looking at the generated assembly using --save-temps: > >> 32 .section .gnu.lto_*_xxx,"dr"
> However, before I go off and adjust the assembler to accept more flexible > section names, I wondered if anyone could tell me off the top of their head: > is LTO /meant/ to generate section names with asterisks in them like that? Nah, I'm fairly sure not. It's coming from here: > void > produce_asm (struct output_block *ob, tree fn) > { > enum lto_section_type section_type = ob->section_type; > struct lto_function_header header; > char *section_name; > struct lto_output_stream *header_stream; > > if (section_type == LTO_section_function_body) > { > const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fn)); > section_name = lto_get_section_name (section_type, name); > } > else For the declaration > int xxx(void) __asm__("_" "xxx"); DECL_ASSEMBLER_NAME returns "*_xxx". I see that other parts of LTO are aware of this problem: > /* FIXME lto: this is from assemble_name_raw in varasm.c. For some > architectures we might have to do the same name manipulations that > ASM_OUTPUT_LABELREF does. */ > if (name[0] == '*') > name = &name[1]; ... so is there an overarching plan to clean this up, or should I just try copy'n'pasting the same workaround into produce_asm()? cheers, DaveK