Replace is_archive with maybe_archive.
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 6 Dec 2010 00:07:06 +0000 (00:07 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 6 Dec 2010 00:07:06 +0000 (00:07 +0000)
2010-12-05  H.J. Lu  <hongjiu.lu@intel.com>

* ldfile.c (ldfile_open_file_search): Check maybe_archive instead
of is_archive.
* emultempl/aix.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/linux.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/sunos.em: Likewise.
* emultempl/vms.em: Likewise.

* ldlang.c (new_afile): Set maybe_archive instead of is_archive..

* ldlang.h (lang_input_statement_struct): Replace is_archive
with maybe_archive.

ld/ChangeLog
ld/emultempl/aix.em
ld/emultempl/elf32.em
ld/emultempl/linux.em
ld/emultempl/pe.em
ld/emultempl/pep.em
ld/emultempl/sunos.em
ld/emultempl/vms.em
ld/ldfile.c
ld/ldlang.c
ld/ldlang.h

index c1e59bfdac86aab70516b8b7b2725d981fe9052e..bb7b5a6a78536829fec369c363d0bf5e1db8a948 100644 (file)
@@ -1,3 +1,20 @@
+2010-12-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ldfile.c (ldfile_open_file_search): Check maybe_archive instead
+       of is_archive.
+       * emultempl/aix.em: Likewise.
+       * emultempl/elf32.em: Likewise.
+       * emultempl/linux.em: Likewise.
+       * emultempl/pe.em: Likewise.
+       * emultempl/pep.em: Likewise.
+       * emultempl/sunos.em: Likewise.
+       * emultempl/vms.em: Likewise.
+
+       * ldlang.c (new_afile): Set maybe_archive instead of is_archive..
+
+       * ldlang.h (lang_input_statement_struct): Replace is_archive
+       with maybe_archive.
+
 2010-12-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * plugin.c (asymbol_from_plugin_symbol): Properly convert LTO
index 4dc36c305093da4bb43a2259a1b428918419b878..5ccb25cba542c7709cdf9cd0e53a5435fec7a03d 100644 (file)
@@ -1426,7 +1426,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch,
 {
   char *path;
 
-  if (!entry->is_archive)
+  if (!entry->maybe_archive)
     return FALSE;
 
   path = concat (search->name, "/lib", entry->filename, arch, ".a", NULL);
index 1950efec0e3b9768ba4f953fd723eb0d475c8501..34cc82c72e9005216b01fbb567e865739dc9c865 100644 (file)
@@ -1618,7 +1618,7 @@ gld${EMULATION_NAME}_open_dynamic_archive
   const char *filename;
   char *string;
 
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     return FALSE;
 
   filename = entry->filename;
@@ -1672,7 +1672,7 @@ gld${EMULATION_NAME}_open_dynamic_archive
   if (bfd_check_format (entry->the_bfd, bfd_object)
       && (entry->the_bfd->flags & DYNAMIC) != 0)
     {
-      ASSERT (entry->is_archive && entry->search_dirs_flag);
+      ASSERT (entry->maybe_archive && entry->search_dirs_flag);
 
       /* Rather than duplicating the logic above.  Just use the
         filename we recorded earlier.  */
index 2a2a960a49fed9e6bed35f4703622ce6cf8952f2..db628308c218a0cfdc668c65a9513cb304d746fd 100644 (file)
@@ -62,7 +62,7 @@ gld${EMULATION_NAME}_open_dynamic_archive
 {
   char *string;
 
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     return FALSE;
 
   string = (char *) xmalloc (strlen (search->name)
index 24c1fe7477abd222963bcb12306dc4ea45ade80b..df0678ddf7323f48a5421d9ea7cebb966982dad5 100644 (file)
@@ -2086,7 +2086,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive
   unsigned int i;
 
 
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     return FALSE;
 
   filename = entry->filename;
index 444704bc59809f120367f9ba490dd9e1dad360e7..4ab748993d22bb2cd78106810e77b298e03bf6a4 100644 (file)
@@ -1824,7 +1824,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive
   unsigned int i;
 
 
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     return FALSE;
 
   filename = entry->filename;
index bbd60751205a35888c894bc9a8e1b907bf4daf3c..5c6c0a6a7ccd38b141a2160e619cd7b67e5c09ee 100644 (file)
@@ -157,7 +157,7 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
   struct stat st;
 
   if (! inp->search_dirs_flag
-      || ! inp->is_archive
+      || ! inp->maybe_archive
       || ! inp->dynamic)
     return;
 
@@ -889,7 +889,7 @@ gld${EMULATION_NAME}_count_need (lang_input_statement_type *inp)
     {
       ++need_entries;
       need_size += NEED_ENTRY_SIZE;
-      if (! inp->is_archive)
+      if (! inp->maybe_archive)
        need_size += strlen (inp->filename) + 1;
       else
        {
@@ -917,7 +917,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
         referential locality.  */
       bfd_put_32 (link_info.output_bfd, need_pnames - need_contents,
                  need_pinfo);
-      if (! inp->is_archive)
+      if (! inp->maybe_archive)
        {
          bfd_put_32 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 4);
          bfd_put_16 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 8);
index f21796b83fc20863d0528f5cb9583b56b9cb0fad..fb8fd53138f9d1fa3b94beeafebe97578a95d5c0 100644 (file)
@@ -52,7 +52,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED,
 {
   char *string;
 
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     return FALSE;
 
   string = (char *) xmalloc (strlen (search->name)
index 3d9feb5fa1d8df99bee4faccac2eae9a91461456..a9a69544d33cd9f8b38c3298d7fac28bb9041db7 100644 (file)
@@ -370,7 +370,7 @@ ldfile_open_file_search (const char *arch,
 
   /* If this is not an archive, try to open it in the current
      directory first.  */
-  if (! entry->is_archive)
+  if (! entry->maybe_archive)
     {
       if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
        {
@@ -407,7 +407,7 @@ ldfile_open_file_search (const char *arch,
            }
        }
 
-      if (entry->is_archive)
+      if (entry->maybe_archive)
        string = concat (search->name, slash, lib, entry->filename,
                         arch, suffix, (const char *) NULL);
       else
index 2927ec8a95e7b6e9b500d8634361dad77a52b4e3..e804a53b84a0fe4e5905b4ad14aaf841b2fe914f 100644 (file)
@@ -1015,7 +1015,7 @@ new_afile (const char *name,
     {
     case lang_input_file_is_symbols_only_enum:
       p->filename = name;
-      p->is_archive = FALSE;
+      p->maybe_archive = FALSE;
       p->real = TRUE;
       p->local_sym_name = name;
       p->just_syms_flag = TRUE;
@@ -1023,14 +1023,14 @@ new_afile (const char *name,
       break;
     case lang_input_file_is_fake_enum:
       p->filename = name;
-      p->is_archive = FALSE;
+      p->maybe_archive = FALSE;
       p->real = FALSE;
       p->local_sym_name = name;
       p->just_syms_flag = FALSE;
       p->search_dirs_flag = FALSE;
       break;
     case lang_input_file_is_l_enum:
-      p->is_archive = TRUE;
+      p->maybe_archive = TRUE;
       p->filename = name;
       p->real = TRUE;
       p->local_sym_name = concat ("-l", name, (const char *) NULL);
@@ -1039,7 +1039,7 @@ new_afile (const char *name,
       break;
     case lang_input_file_is_marker_enum:
       p->filename = name;
-      p->is_archive = FALSE;
+      p->maybe_archive = FALSE;
       p->real = FALSE;
       p->local_sym_name = name;
       p->just_syms_flag = FALSE;
@@ -1048,7 +1048,7 @@ new_afile (const char *name,
     case lang_input_file_is_search_file_enum:
       p->sysrooted = ldlang_sysrooted_script;
       p->filename = name;
-      p->is_archive = FALSE;
+      p->maybe_archive = FALSE;
       p->real = TRUE;
       p->local_sym_name = name;
       p->just_syms_flag = FALSE;
@@ -1056,7 +1056,7 @@ new_afile (const char *name,
       break;
     case lang_input_file_is_file_enum:
       p->filename = name;
-      p->is_archive = FALSE;
+      p->maybe_archive = FALSE;
       p->real = TRUE;
       p->local_sym_name = name;
       p->just_syms_flag = FALSE;
index 0b7b43b4151a26fc3bf814f3a970848095b841cb..15e558758e8125c82ec8ca74ebda31cb7f6f3a20 100644 (file)
@@ -249,7 +249,7 @@ typedef struct lang_input_statement_struct
 
   const char *target;
 
-  unsigned int is_archive : 1;
+  unsigned int maybe_archive : 1;
 
   /* 1 means search a set of directories for this file.  */
   unsigned int search_dirs_flag : 1;