diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2011-02-28 18:34:52 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2011-02-28 18:34:52 +0000 |
commit | 426278217bb00a4eb13f360b408fae9368f3a3af (patch) | |
tree | ac8da852b38f21121ea96de78d48e623329498fd /ld/emultempl | |
parent | 8b6efd89a4135971b748c958a852d093b3d79d3d (diff) | |
download | gdb-426278217bb00a4eb13f360b408fae9368f3a3af.zip gdb-426278217bb00a4eb13f360b408fae9368f3a3af.tar.gz gdb-426278217bb00a4eb13f360b408fae9368f3a3af.tar.bz2 |
2011-02-28 Kai Tietz <kai.tietz@onevision.com>
* 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.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/beos.em | 9 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 13 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 18 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 18 |
4 files changed, 32 insertions, 26 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index 6dc6375..cd96729 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -40,6 +40,7 @@ fragment <<EOF #include "bfdlink.h" #include "getopt.h" #include "libiberty.h" +#include "filenames.h" #include "ld.h" #include "ldmain.h" #include "ldexp.h" @@ -396,13 +397,13 @@ sort_by_file_name (const void *a, const void *b) const lang_statement_union_type *const *rb = b; int i, a_sec, b_sec; - i = strcmp ((*ra)->input_section.section->owner->my_archive->filename, - (*rb)->input_section.section->owner->my_archive->filename); + i = filename_cmp ((*ra)->input_section.section->owner->my_archive->filename, + (*rb)->input_section.section->owner->my_archive->filename); if (i != 0) return i; - i = strcmp ((*ra)->input_section.section->owner->filename, - (*rb)->input_section.section->owner->filename); + i = filename_cmp ((*ra)->input_section.section->owner->filename, + (*rb)->input_section.section->owner->filename); if (i != 0) return i; /* the tail idata4/5 are the only ones without relocs to an diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index ddcd590..17fb8bf 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -40,6 +40,7 @@ fragment <<EOF #include "sysdep.h" #include "bfd.h" #include "libiberty.h" +#include "filenames.h" #include "safe-ctype.h" #include "getopt.h" #include "md5.h" @@ -200,7 +201,7 @@ gld${EMULATION_NAME}_vercheck (lang_input_statement_type *s) { const char *suffix; - if (strcmp (soname, l->name) == 0) + if (filename_cmp (soname, l->name) == 0) { /* Probably can't happen, but it's an easy check. */ continue; @@ -215,7 +216,7 @@ gld${EMULATION_NAME}_vercheck (lang_input_statement_type *s) suffix += sizeof ".so." - 1; - if (strncmp (soname, l->name, suffix - l->name) == 0) + if (filename_ncmp (soname, l->name, suffix - l->name) == 0) { /* Here we know that S is a dynamic object FOO.SO.VER1, and the object we are considering needs a dynamic object @@ -290,7 +291,7 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s) if (soname == NULL) soname = lbasename (s->filename); - if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0) + if (filename_ncmp (soname, global_needed->name, suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", global_needed->name, global_needed->by, soname); } @@ -855,7 +856,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s) && (bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0) return; - if (strcmp (s->filename, global_needed->name) == 0) + if (filename_cmp (s->filename, global_needed->name) == 0) { global_found = s; return; @@ -865,7 +866,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s) { const char *f = strrchr (s->filename, '/'); if (f != NULL - && strcmp (f + 1, global_needed->name) == 0) + && filename_cmp (f + 1, global_needed->name) == 0) { global_found = s; return; @@ -874,7 +875,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname != NULL - && strcmp (soname, global_needed->name) == 0) + && filename_cmp (soname, global_needed->name) == 0) { global_found = s; return; diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index a3e4cdd..9b800cd 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -56,6 +56,7 @@ fragment <<EOF #include "bfdlink.h" #include "getopt.h" #include "libiberty.h" +#include "filenames.h" #include "ld.h" #include "ldmain.h" #include "ldexp.h" @@ -1405,8 +1406,9 @@ gld_${EMULATION_NAME}_after_open (void) ? bfd_get_filename (blhe->u.def.section->owner->my_archive) : bfd_get_filename (blhe->u.def.section->owner); - if (strcmp (bfd_get_filename (is->the_bfd->my_archive), - other_bfd_filename) == 0) + if (filename_cmp (bfd_get_filename + (is->the_bfd->my_archive), + other_bfd_filename) == 0) continue; /* Rename this implib to match the other one. */ @@ -1460,7 +1462,7 @@ gld_${EMULATION_NAME}_after_open (void) extension, and use that for the remainder of the comparisons. */ pnt = strrchr (is3->the_bfd->filename, '.'); - if (pnt != NULL && strcmp (pnt, ".dll") == 0) + if (pnt != NULL && filename_cmp (pnt, ".dll") == 0) break; } @@ -1477,11 +1479,11 @@ gld_${EMULATION_NAME}_after_open (void) /* Skip static members, ie anything with a .obj extension. */ pnt = strrchr (is2->the_bfd->filename, '.'); - if (pnt != NULL && strcmp (pnt, ".obj") == 0) + if (pnt != NULL && filename_cmp (pnt, ".obj") == 0) continue; - if (strcmp (is3->the_bfd->filename, - is2->the_bfd->filename)) + if (filename_cmp (is3->the_bfd->filename, + is2->the_bfd->filename)) { is_ms_arch = 0; break; @@ -1495,7 +1497,7 @@ gld_${EMULATION_NAME}_after_open (void) then leave the filename alone. */ pnt = strrchr (is->the_bfd->filename, '.'); - if (is_ms_arch && (strcmp (pnt, ".dll") == 0)) + if (is_ms_arch && (filename_cmp (pnt, ".dll") == 0)) { int idata2 = 0, reloc_count=0; asection *sec; @@ -1668,7 +1670,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB #ifdef DLL_SUPPORT const char *ext = entry->filename + strlen (entry->filename) - 4; - if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0) + if (filename_cmp (ext, ".def") == 0 || filename_cmp (ext, ".DEF") == 0) { pe_def_file = def_file_parse (entry->filename, pe_def_file); diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index a307c14..2119367 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -44,6 +44,7 @@ fragment <<EOF #include "bfdlink.h" #include "getopt.h" #include "libiberty.h" +#include "filenames.h" #include "ld.h" #include "ldmain.h" #include "ldexp.h" @@ -1318,8 +1319,9 @@ gld_${EMULATION_NAME}_after_open (void) ? bfd_get_filename (blhe->u.def.section->owner->my_archive) : bfd_get_filename (blhe->u.def.section->owner); - if (strcmp (bfd_get_filename (is->the_bfd->my_archive), - other_bfd_filename) == 0) + if (filename_cmp (bfd_get_filename + (is->the_bfd->my_archive), + other_bfd_filename) == 0) continue; /* Rename this implib to match the other one. */ @@ -1373,7 +1375,7 @@ gld_${EMULATION_NAME}_after_open (void) extension, and use that for the remainder of the comparisons. */ pnt = strrchr (is3->the_bfd->filename, '.'); - if (pnt != NULL && strcmp (pnt, ".dll") == 0) + if (pnt != NULL && filename_cmp (pnt, ".dll") == 0) break; } @@ -1390,11 +1392,11 @@ gld_${EMULATION_NAME}_after_open (void) /* Skip static members, ie anything with a .obj extension. */ pnt = strrchr (is2->the_bfd->filename, '.'); - if (pnt != NULL && strcmp (pnt, ".obj") == 0) + if (pnt != NULL && filename_cmp (pnt, ".obj") == 0) continue; - if (strcmp (is3->the_bfd->filename, - is2->the_bfd->filename)) + if (filename_cmp (is3->the_bfd->filename, + is2->the_bfd->filename)) { is_ms_arch = 0; break; @@ -1408,7 +1410,7 @@ gld_${EMULATION_NAME}_after_open (void) then leave the filename alone. */ pnt = strrchr (is->the_bfd->filename, '.'); - if (is_ms_arch && (strcmp (pnt, ".dll") == 0)) + if (is_ms_arch && (filename_cmp (pnt, ".dll") == 0)) { int idata2 = 0, reloc_count=0; asection *sec; @@ -1472,7 +1474,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB #ifdef DLL_SUPPORT const char *ext = entry->filename + strlen (entry->filename) - 4; - if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0) + if (filename_cmp (ext, ".def") == 0 || filename_cmp (ext, ".DEF") == 0) { pep_def_file = def_file_parse (entry->filename, pep_def_file); |