This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] | |
----- Original Message -----
From: "Nick Clifton"
Sent: Thursday, 2 February 2006 00:25
> Hi Danny,
> Do we really need to be concerned about speed here ?
> I think that clarity of code is more important in this case, and so I
> would recommend a simpler approach, eg:
>
> if (strchr (image_name, '.') == 0)
> {
> const char * suffix = is_dll ? ".dll" : ".exe";
>
> def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
> sprintf (def->name, "%s%s, image_name, suffix);
> }
>
> Cheers
> Nick
Thanks. Attached patch uses your suggestion above.
Regards
Danny
ChangeLog
2006-02-02 Danny Smith <dannysmith@users.sourceforge.net>
* deffilep.y (def_image_name): If the image name does not have
a suffix, append the default.
* ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
.
Attachment:
def_name_suffix.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |