. origin, with origin set to 0 for non archive files. *}
. ufile_ptr origin;
.
+. {* The origin in the archive of the proxy entry. This will
+. normally be the same as origin, except for thin archives,
+. when it will contain the current offset of the proxy in the
+. thin archive rather than the offset of the bfd in its actual
+. container. *}
+. ufile_ptr proxy_origin;
+.
. {* A hash table for section names. *}
. struct bfd_hash_table section_htab;
.
. {* Used for input and output. *}
. unsigned int symcount;
.
-. {* Symbol table for output BFD (with symcount entries). *}
+. {* Symbol table for output BFD (with symcount entries).
+. Also used by the linker to cache input BFD symbols. *}
. struct bfd_symbol **outsymbols;
.
. {* Used for slurped dynamic symbol tables. *}
. struct bfd *my_archive; {* The containing archive BFD. *}
. struct bfd *archive_next; {* The next BFD in the archive. *}
. struct bfd *archive_head; {* The first BFD in the archive. *}
+. struct bfd *nested_archives; {* List of nested archive in a flattened
+. thin archive. *}
.
. {* A chain of BFD structures involved in a link. *}
. struct bfd *link_next;
.
. {* Have archive map. *}
. unsigned int has_armap : 1;
+.
+. {* Set if this is a thin archive. *}
+. unsigned int is_thin_archive : 1;
.};
.
*/
|| strcmp (name, "pei-arm-wince-little") == 0)
return 1;
+ if (CONST_STRNEQ (name, "mach-o"))
+ return 0;
+
bfd_set_error (bfd_error_wrong_format);
return -1;
}
return bed->s->elfclass == ELFCLASS32;
}
- /* For non-ELF, make a guess based on the target name. */
- return (strstr (bfd_get_target (abfd), "64") == NULL
- && strcmp (bfd_get_target (abfd), "mmo") != 0);
+ /* For non-ELF targets, use architecture information. */
+ return bfd_arch_bits_per_address (abfd) <= 32;
}
#endif
char *res, *alloc;
const char *pre, *suf;
size_t pre_len;
+ bfd_boolean skip_lead;
- if (abfd != NULL
- && *name != '\0'
- && bfd_get_symbol_leading_char (abfd) == *name)
+ skip_lead = (abfd != NULL
+ && *name != '\0'
+ && bfd_get_symbol_leading_char (abfd) == *name);
+ if (skip_lead)
++name;
/* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
free (alloc);
if (res == NULL)
- return NULL;
+ {
+ if (skip_lead)
+ {
+ size_t len = strlen (pre) + 1;
+ alloc = bfd_malloc (len);
+ if (alloc == NULL)
+ return NULL;
+ memcpy (alloc, pre, len);
+ return alloc;
+ }
+ return NULL;
+ }
/* Put back any prefix or suffix. */
if (pre_len != 0 || suf != NULL)