This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch/PE-COFF: Provide default suffix to NAME or LIBRARY names in .def files
----- Original Message -----
From: "Christopher Faylor"
Sent: Wednesday, 1 February 2006 15:30
> On Wed, Feb 01, 2006 at 01:40:28PM +1300, Danny Smith wrote:
> >ChangeLog
> >
> >2006-02-01 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.
>
> Just a minor nit.
>
> >! memcpy (def->name + len, is_dll ? ".dll\0" : ".exe\0", 5);
>
> I don't see any reason for an explicit \0 in the above case. That's
> a given. Was this just to make it clear where the fifth character was
> coming from in the copy?
Yes.
>
> Also, on some architectures, I believe that strcpy would be faster
> than memcpy for this operation.
I didn't know that.
Does using memcpy buy us anything here?
I had just called memcpy in line above, so I called it again
But if strcpy is faster, I'll change to that.
Danny
>
> cgf