diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1996-04-02 21:28:33 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1996-04-02 21:28:33 +0000 |
commit | d1f74cd2c3a5165946c0152eeedd5515a356a189 (patch) | |
tree | 832e5e409217bdec2a88b1bfca2270612bc8718f /bfd/sunos.c | |
parent | 19bfbcbecf49abb63d85b0244dc10770e3b4ac9a (diff) | |
download | gdb-d1f74cd2c3a5165946c0152eeedd5515a356a189.zip gdb-d1f74cd2c3a5165946c0152eeedd5515a356a189.tar.gz gdb-d1f74cd2c3a5165946c0152eeedd5515a356a189.tar.bz2 |
* 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.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r-- | bfd/sunos.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c index d0b8797..75f3ce3 100644 --- a/bfd/sunos.c +++ b/bfd/sunos.c @@ -78,6 +78,14 @@ static boolean sunos_finish_dynamic_link #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" @@ -1028,8 +1036,13 @@ sunos_add_one_symbol (info, abfd, name, flags, section, value, string, 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; @@ -1796,6 +1809,17 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size) || (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; |