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]

Re: [PATCH] Implement lto-plugin for COFF on windows.


>    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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]