Patch/PE-COFF: Provide default suffix to NAME or LIBRARY names in .def files
Christopher Faylor
me@cgf.cx
Wed Feb 1 02:30:00 GMT 2006
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?
Also, on some architectures, I believe that strcpy would be faster
than memcpy for this operation. Does using memcpy buy us anything here?
cgf
More information about the Binutils
mailing list