This is the mail archive of the binutils@sources.redhat.com 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]

Re: [Patch] skipping import libraries for performance reasons - directauto-import of dll's


Nick Clifton wrote:

I have now applied applied this patch.  Many apologies for taking so
long to getting around to doing this.  I fixed up any indentation and
formatting issues at the same time, so there should be no problem
there.
As Danny Smith pointed out, PATH_MAX doesn't count the terminating nul, according to limits.h, so we should be using PATH_MAX + 1 (e.g. LD_PATHMAX + 1). (I had thought Danny's change had made it into Ralf's codebase, and thus onto the binutils list -- but apparently not. So here it is.)

--Chuck

2002-12-16 Danny Smith <dannysmith@users.sourceforge.net>

* ld/emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file):
use LD_PATHMAX+1 to account for trailing '\0'

*** pe.em.bak Tue Dec 10 04:33:15 2002
--- pe.em Tue Dec 10 23:51:31 2002
*************** gld_${EMULATION_NAME}_recognized_file(en
*** 1389,1398 ****
#endif
if (bfd_get_format (entry->the_bfd) == bfd_object)
{
! char fbuf[LD_PATHMAX];
const char *ext;
! if (REALPATH(entry->filename,fbuf) == NULL)
! strncpy(fbuf,entry->filename,LD_PATHMAX);
ext = fbuf + strlen (fbuf) - 4;
if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
return pe_implied_import_dll (fbuf);
--- 1389,1398 ----
#endif
if (bfd_get_format (entry->the_bfd) == bfd_object)
{
! char fbuf[LD_PATHMAX + 1];
const char *ext;
! if (REALPATH(entry->filename, fbuf) == NULL)
! strncpy (fbuf, entry->filename, LD_PATHMAX + 1);
ext = fbuf + strlen (fbuf) - 4;
if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
return pe_implied_import_dll (fbuf);



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