This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch ld]: Let binutils understand DOS-paths (3 of 4)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, Binutils <binutils at sourceware dot org>, Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Date: Tue, 1 Mar 2011 14:58:04 -0800
- Subject: Re: [patch ld]: Let binutils understand DOS-paths (3 of 4)
- References: <AANLkTikGmjikGb8Wu_pSVJqg19xt-FHFgnMxZSnhWi2h@mail.gmail.com> <4D6BA5F4.1060108@redhat.com> <AANLkTino508rfd95sv2AM5JCgdVdi-O5nA4AjMLpV08-@mail.gmail.com> <AANLkTikvOYhRLdBHdpww9vDAsa0BH-MaTbGJNO0qKmgc@mail.gmail.com>
On Tue, Mar 1, 2011 at 2:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Feb 28, 2011 at 10:39 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2011/2/28 Nick Clifton <nickc@redhat.com>:
>>> Hi Kai,
>>>
>>>> ChangeLog ld/
>>>> 2011-02-27 ?Kai Tietz
>>>>
>>>> ? ? ? ?* emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp.
>>>> ? ? ? ?* emultempl/elf32.em (gld${EMULATION_NAME}_vercheck):
>>>> ? ? ? ?Likewise.
>>>> ? ? ? ?(gld${EMULATION_NAME}_stat_needed): Likewise.
>>>> ? ? ? ?(gld${EMULATION_NAME}_check_needed): Likewise.
>>>> ? ? ? ?* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise.
>>>> ? ? ? ?(gld_${EMULATION_NAME}_unrecognized_file): Likewise.
>>>> ? ? ? ?* emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
>>>> ? ? ? ?(gld_${EMULATION_NAME}_unrecognized_file): Likewise.
>>>> ? ? ? ?* ldfile.c (ldfile_open_file): Likewise.
>>>> ? ? ? ?* ldlang.c (wild_sort): Likewise.
>>>> ? ? ? ?(lookup_name): Likewise.
>>>> ? ? ? ?(check_excluded_libs): Likewise.
>>>> ? ? ? ?* ldmisc.c (vfinfo): Likewise.
>>>> ? ? ? ?* pe-dll.c (libnamencmp): Likewise.
>>>> ? ? ? ?(auto_export): Likewise.
>>>> ? ? ? ?(pe_dll_generate_implib): Likewise.
>>>> ? ? ? ?* testplug.c (onclaim_file): Likewise.
>>>
>>> Approved - please apply.
>>>
>>> Cheers
>>> ?Nick
>>>
>
> This caused:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=12529
>
Linker failed to load libldtestplug.so since filename_cmp is
undefined. I checked in this patch to revert it.
Please make sure that "make check" works on Linux/x86
before making changes like this.
Thanks.
--
H.J.
---
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8ed86f3..4f5f2c8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12529
+ * testplug.c: Don't include "filenames.h".
+ (onclaim_file): Don't use filename_cmp.
+
2011-02-28 Kai Tietz <kai.tietz@onevision.com>
* emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp.
diff --git a/ld/testplug.c b/ld/testplug.c
index 9e1561c..f04df10 100644
--- a/ld/testplug.c
+++ b/ld/testplug.c
@@ -23,7 +23,6 @@
#include "plugin-api.h"
/* For ARRAY_SIZE macro only - we don't link the library itself. */
#include "libiberty.h"
-#include "filenames.h"
extern enum ld_plugin_status onload (struct ld_plugin_tv *tv);
static enum ld_plugin_status onclaim_file (const struct
ld_plugin_input_file *file,
@@ -520,7 +519,7 @@ onclaim_file (const struct ld_plugin_input_file
*file, int *claimed)
claim_file_t *claimfile = claimfiles_list;
while (claimfile)
{
- if (!filename_cmp (file->name, claimfile->file.name))
+ if (!strcmp (file->name, claimfile->file.name))
break;
claimfile = claimfile->next;
}