This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I see one more thing that I want to clarify before approving the patch:
+ fputs ("\t.ascii \"", asm_out_file); + + varasm_print_gcc_option (name); + fputs ("\\0\"\n", asm_out_file);
Can we use ASM_OUTPUT_ASCII here instead?
It looks like that might handle the escaping, quoting, embedded NUL issues that you're dealing with here, and make elf_record_gcc_switches work on any ELF platforms that use something other than .ascii for strings. It looks to me like something like this:
ASM_OUTPUT_ASCII (asm_out_file, name, strlen (name) + 1);
would work. (The +1 is so that we encode the trailing NUL.)
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |