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]

Re: [patch bfd]: Fix PR ld/12742 for windows targets


On Sat, Mar 10, 2012 at 3:24 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hi,
>
> 2012/3/10 Jeffrey Walton <noloader@gmail.com>:
>> On Fri, Mar 9, 2012 at 2:54 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>>> Hi,
>>>
>>> this patch adds compatible implementation of dlfcn API on Windows
>>> targets, if this header/API isn't present.
>>>
>>> ChangeLog
>>>
>>> 2012-03-09 ÂKai Tietz Â<ktietz@redhat.com>
>>>
>>> Â Â Â ÂPR ld/12742
>>> Â Â Â Â* configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
>>> Â Â Â Â* plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
>>> Â Â Â ÂAdd windows.h header include if HAVE_WINDOWS_H is defined.
>>> Â Â Â Â(dlerror): New static function if windows variant is used instead
>>> Â Â Â Âof dlfcn.h.
>>> Â Â Â Â(dlclose): Likewise.
>>> Â Â Â Â(dlopen): Likewise.
>>> Â Â Â Â(dlsym): Likewise.
>>> Â Â Â Â* configure: Regenerated.
>>> Â Â Â Â* config.in: Regenerated.
>>>
>>> Tested for i686-w64-mingw32 and x86_64-w64-mingw32. ÂOk for apply?
>>>
>>> Regards,
>>> Kai
>>>
>>> [SNIP]
>>
>> It looks like there could be problems with search paths.
>>
>> "Dynamic-Link Library Search Order,"
>> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx
>> "Dynamic-Link Library Security,"
>> http://msdn.microsoft.com/en-us/library/windows/desktop/ff919712(v=vs.85).aspx.
>
> What you mean here in special? ÂI use here default search-behavior for
> DLLs. ÂIt means DLL is searched first at applications location, then
> in system-directory (here for sure no such DLL has to be placed IMHO),
> and then in paths specified by PATH-environment.
>
> Sorry, I don't get your point.
The default search path behavior is insecure.

Jeff


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