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
plugin visibility to ELF visibility.
(is_visible_from_outside): Re-indent.
{
char *path;
- if (!entry->is_archive)
+ if (!entry->maybe_archive)
return FALSE;
path = concat (search->name, "/lib", entry->filename, arch, ".a", NULL);
const char *filename;
char *string;
- if (! entry->is_archive)
+ if (! entry->maybe_archive)
return FALSE;
filename = entry->filename;
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. */
{
char *string;
- if (! entry->is_archive)
+ if (! entry->maybe_archive)
return FALSE;
string = (char *) xmalloc (strlen (search->name)
unsigned int i;
- if (! entry->is_archive)
+ if (! entry->maybe_archive)
return FALSE;
filename = entry->filename;
unsigned int i;
- if (! entry->is_archive)
+ if (! entry->maybe_archive)
return FALSE;
filename = entry->filename;
struct stat st;
if (! inp->search_dirs_flag
- || ! inp->is_archive
+ || ! inp->maybe_archive
|| ! inp->dynamic)
return;
{
++need_entries;
need_size += NEED_ENTRY_SIZE;
- if (! inp->is_archive)
+ if (! inp->maybe_archive)
need_size += strlen (inp->filename) + 1;
else
{
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);
{
char *string;
- if (! entry->is_archive)
+ if (! entry->maybe_archive)
return FALSE;
string = (char *) xmalloc (strlen (search->name)
/* 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))
{
}
}
- if (entry->is_archive)
+ if (entry->maybe_archive)
string = concat (search->name, slash, lib, entry->filename,
arch, suffix, (const char *) NULL);
else
{
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;
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);
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;
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;
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;
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;