(aout_32_sunos4_write_object_contents): Likewise.
* aoutx.h (NAME(aout,machine_type)): Handle
bfd_mach_sparc_{sparclet,sparclite}.
* archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
(bfd_mach_sparc_v9_p): Update.
* cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
* libaout.h (enum machine_type): Add M_SPARCLET.
* sunos.c (MACHTYPE_OK): Define.
* bfd-in2.h: Regenerated.
+Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
+ (aout_32_sunos4_write_object_contents): Likewise.
+ * aoutx.h (NAME(aout,machine_type)): Handle
+ bfd_mach_sparc_{sparclet,sparclite}.
+ * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
+ (bfd_mach_sparc_v9_p): Update.
+ * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
+ * libaout.h (enum machine_type): Add M_SPARCLET.
+ * sunos.c (MACHTYPE_OK): Define.
+ * bfd-in2.h: Regenerated.
+
Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
* elf-bfd.h (struct elf_link_hash_table): Add hgot field.
case bfd_arch_sparc:
if (machine == 0
|| machine == bfd_mach_sparc
+ || machine == bfd_mach_sparc_sparclite
|| machine == bfd_mach_sparc_v9)
arch_flags = M_SPARC;
+ else if (machine == bfd_mach_sparc_sparclet)
+ arch_flags = M_SPARCLET;
break;
case bfd_arch_m68k:
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_v8plus 2
-#define bfd_mach_sparc_v8plusa 3 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_v9 4
-#define bfd_mach_sparc_v9a 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_sparclet 2
+#define bfd_mach_sparc_sparclite 3
+#define bfd_mach_sparc_v8plus 4
+#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v9 6
+#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) ((mach) != bfd_mach_sparc)
+#define bfd_mach_sparc_v9_p(mach) \
+ ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
bfd_arch_mips, /* MIPS Rxxxx */
bfd_arch_i386, /* Intel 386 */
bfd_arch_we32k, /* AT&T WE32xxx */
};
/* Magic number is written
-< MSB >
+< MSB >
3130292827262524232221201918171615141312111009080706050403020100
-< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
+< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
*/
/* Magic number for NetBSD is
-<MSB >
+<MSB >
3130292827262524232221201918171615141312111009080706050403020100
-< FLAGS >< >< MAGIC NUMBER >
+< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
*/
enum machine_type {
M_68K4K_NETBSD = 136, /* NetBSD/m68k4k binary */
M_532_NETBSD = 137, /* NetBSD/ns32k binary */
M_SPARC_NETBSD = 138, /* NetBSD/sparc binary */
+ M_SPARCLET = 142, /* SPARClet */
M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
/* start-sanitize-rce */
#define MY_check_dynamic_reloc sunos_check_dynamic_reloc
#define MY_finish_dynamic_link sunos_finish_dynamic_link
+/* ??? Where should this go? */
+#define MACHTYPE_OK(mtype) \
+ (((mtype) == M_SPARC && bfd_lookup_arch (bfd_arch_sparc, 0) != NULL) \
+ || ((mtype) == M_SPARCLET \
+ && bfd_lookup_arch (bfd_arch_sparc, bfd_mach_sparc_sparclet) != NULL) \
+ || (((mtype) == M_UNKNOWN || (mtype) == M_68010 || (mtype) == M_68020) \
+ && bfd_lookup_arch (bfd_arch_m68k, 0) != NULL))
+
/* Include the usual a.out support. */
#include "aoutf1.h"
return false;
}
- h = sunos_link_hash_lookup (sunos_hash_table (info), name, true, copy,
- false);
+ if ((flags & (BSF_INDIRECT | BSF_WARNING | BSF_CONSTRUCTOR)) != 0
+ || ! bfd_is_und_section (section))
+ h = sunos_link_hash_lookup (sunos_hash_table (info), name, true, copy,
+ false);
+ else
+ h = ((struct sunos_link_hash_entry *)
+ bfd_wrapped_link_hash_lookup (abfd, info, name, true, copy, false));
if (h == NULL)
return false;
|| (h->flags & SUNOS_DEF_REGULAR) != 0))
continue;
+ if (r_type == RELOC_JMP_TBL
+ && ! info->shared
+ && (h->flags & SUNOS_DEF_DYNAMIC) == 0
+ && (h->flags & SUNOS_DEF_REGULAR) == 0)
+ {
+ /* This symbol is apparently undefined. Don't do anything
+ here; just let the relocation routine report an undefined
+ symbol. */
+ continue;
+ }
+
if (strcmp (h->root.root.root.string, "__GLOBAL_OFFSET_TABLE_") == 0)
continue;