aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorGavin Romig-Koch <gavin@redhat.com>1998-12-12 22:22:11 +0000
committerGavin Romig-Koch <gavin@redhat.com>1998-12-12 22:22:11 +0000
commitb3f1799e8136ff32f31089b7d1bb56194693663c (patch)
tree2034717e3de0d32ed01f0dab9883cc483a75ebc1 /bfd
parentbcb601c149c85cb093667ce67499179cae67dabf (diff)
downloadfsf-binutils-gdb-b3f1799e8136ff32f31089b7d1bb56194693663c.zip
fsf-binutils-gdb-b3f1799e8136ff32f31089b7d1bb56194693663c.tar.gz
fsf-binutils-gdb-b3f1799e8136ff32f31089b7d1bb56194693663c.tar.bz2
elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4300.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mips.c65
2 files changed, 55 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b118bde..2bb391a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+1998-12-12 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing):
+ Handle bfd_mach_mips4300.
+
start-sanitize-sky
Sat Dec 12 08:52:41 1998 Doug Evans <devans@charmed.cygnus.com>
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 9065087..08f71ab 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -160,6 +160,11 @@ struct mips_got_info
#define STUB_LI16 0x34180000 /* ori t8,zero,0 */
#define MIPS_FUNCTION_STUB_SIZE (16)
+#if 0
+/* We no longer try to identify particular sections for the .dynsym
+ section. When we do, we wind up crashing if there are other random
+ sections with relocations. */
+
/* Names of sections which appear in the .dynsym section in an Irix 5
executable. */
@@ -184,6 +189,8 @@ static const char * const mips_elf_dynsym_sec_names[] =
#define MIPS_TEXT_DYNSYM_SECNO (3)
+#endif /* 0 */
+
/* The names of the runtime procedure table symbols used on Irix 5. */
static const char * const mips_elf_dynsym_rtproc_names[] =
@@ -841,7 +848,7 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- NULL, /* special_function */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
"R_MIPS_GNU_VTENTRY", /* name */
false, /* partial_inplace */
0, /* src_mask */
@@ -1580,8 +1587,6 @@ dvp_u15_s3_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- boolean relocateable;
- bfd_reloc_status_type ret;
bfd_vma relocation;
bfd_vma x;
@@ -1671,7 +1676,6 @@ elf_mips_mach (flags)
return bfd_mach_mips4900;
/* end-sanitize-tx49 */
/* start-sanitize-cygnus */
- /* CYGNUS LOCAL vr5400/raeburn */
case E_MIPS_MACH_5400:
return bfd_mach_mips5400;
@@ -2089,6 +2093,7 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
break;
case bfd_mach_mips4000:
+ case bfd_mach_mips4300:
val = E_MIPS_ARCH_3;
break;
@@ -2116,7 +2121,6 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
break;
/* end-sanitize-tx49 */
/* start-sanitize-cygnus */
- /* CYGNUS LOCAL vr5400/raeburn */
case bfd_mach_mips5400:
val = E_MIPS_ARCH_3 | E_MIPS_MACH_5400;
@@ -2638,7 +2642,10 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
|| strcmp (name, ".dynstr") == 0))
{
hdr->sh_entsize = 0;
+#if 0
+ /* This isn't how the Irix 6 linker behaves. */
hdr->sh_info = SIZEOF_MIPS_DYNSYM_SECNAMES;
+#endif
}
else if (strcmp (name, ".got") == 0
|| strcmp (name, ".sdata") == 0
@@ -3354,6 +3361,11 @@ _bfd_mips_elf_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
{
asection *msec;
+ if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr))
+ return true;
+
if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr))
@@ -3515,8 +3527,11 @@ struct mips_elf_link_hash_entry
struct mips_elf_link_hash_table
{
struct elf_link_hash_table root;
+#if 0
+ /* We no longer use this. */
/* String section indices for the dynamic section symbols. */
bfd_size_type dynsym_sec_strindex[SIZEOF_MIPS_DYNSYM_SECNAMES];
+#endif
/* The number of .rtproc entries. */
bfd_size_type procedure_count;
/* The size of the .compact_rel section (if SGI_COMPAT). */
@@ -3601,7 +3616,6 @@ mips_elf_link_hash_table_create (abfd)
bfd *abfd;
{
struct mips_elf_link_hash_table *ret;
- unsigned int i;
ret = ((struct mips_elf_link_hash_table *)
bfd_alloc (abfd, sizeof (struct mips_elf_link_hash_table)));
@@ -3615,8 +3629,11 @@ mips_elf_link_hash_table_create (abfd)
return NULL;
}
+#if 0
+ /* We no longer use this. */
for (i = 0; i < SIZEOF_MIPS_DYNSYM_SECNAMES; i++)
ret->dynsym_sec_strindex[i] = (bfd_size_type) -1;
+#endif
ret->procedure_count = 0;
ret->compact_rel_size = 0;
ret->use_rld_obj_head = false;
@@ -6566,6 +6583,9 @@ mips_elf_gc_mark_hook (abfd, info, rel, h, sym)
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
@@ -7097,15 +7117,20 @@ mips_elf_size_dynamic_sections (output_bfd, info)
That means we must increment the dynamic symbol index of every
other dynamic symbol. */
{
- const char * const *namep;
unsigned int c, i;
- bfd_size_type strindex;
- struct bfd_strtab_hash *dynstr;
struct mips_got_info *g;
c = 0;
if (elf_hash_table (info)->dynamic_sections_created)
{
+#if 0
+ /* We no longer try to restrict the set of sections which get
+ dynamic symbol table entries, since it fails if we have
+ other random sections which need dynamic relocations. */
+ const char * const *namep;
+ bfd_size_type strindex;
+ struct bfd_strtab_hash *dynstr;
+
if (SGI_COMPAT (output_bfd))
{
c = SIZEOF_MIPS_DYNSYM_SECNAMES - 1;
@@ -7133,6 +7158,7 @@ mips_elf_size_dynamic_sections (output_bfd, info)
}
}
else
+#endif /* 0 */
{
c = bfd_count_sections (output_bfd);
elf_link_hash_traverse (elf_hash_table (info),
@@ -7489,8 +7515,11 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
break;
case DT_MIPS_UNREFEXTNO:
- /* XXX FIXME: */
+#if 0
dyn.d_un.d_val = SIZEOF_MIPS_DYNSYM_SECNAMES;
+#else
+ dyn.d_un.d_val = bfd_count_sections (output_bfd);
+#endif
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -7528,12 +7557,7 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
{
asection *sdynsym;
asection *s;
- unsigned int i;
- bfd_vma last;
Elf_Internal_Sym sym;
- long dindx;
- const char *name;
- const char * const * namep = mips_elf_dynsym_sec_names;
Elf32_compact_rel cpt;
/* Set up the section symbols for the output sections. SGI sets
@@ -7542,6 +7566,16 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
if (sdynsym != NULL)
{
+#if 0
+ const char *name;
+ const char * const * namep = mips_elf_dynsym_sec_names;
+ unsigned int i;
+ bfd_vma last;
+ long dindx;
+
+ /* We no longer try to restrict the set of sections which get
+ dynamic symbol table entries, since it fails if we have
+ other random sections which need dynamic relocations. */
if (SGI_COMPAT (output_bfd))
{
sym.st_size = 0;
@@ -7586,6 +7620,7 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
SIZEOF_MIPS_DYNSYM_SECNAMES;
}
else
+#endif /* 0 */
{
sym.st_size = 0;
sym.st_name = 0;