This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement lto-plugin for COFF on windows.
- From: Richard Henderson <rth at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Oct 2010 08:54:02 -0700
- Subject: Re: [PATCH] Implement lto-plugin for COFF on windows.
- References: <4CBB78EB.3070101@gmail.com>
> entry->name = xstrdup (p);
> + switch (style)
> + {
> + case ss_none:
> + break;
> + case ss_win32:
> + if (entry->name[0] == '@')
> + break;
> + /* FALL-THROUGH. */
> + case ss_uscore:
> + entry->name = concat ("_", entry->name, NULL);
> + break;
Bit o' memory wastage here. Better to avoid the xstrdup
in the concat case.
> + for (n = 0; n < num_coff_known_machines; n++)
> + if (*mach == coff_machine_array[n])
> + break;
> + if (n == num_coff_known_machines)
If you're going to recognize an arbitrary set of coff
machines, why are you hard-coding ...
> + x86_64*-mingw*)
> + SYM_STYLE=-DSYM_STYLE=ss_none
> + LTO_FORMAT=coff
> + COFFENDIAN=-DCOFFENDIAN=0
> + ;;
... endianness?
Most of the patch looks pretty good though.
r~