/* Motorola 68k series support for 32-bit ELF
- Copyright 1993, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* end code generated by elf.el */
#define USE_RELA
-
\f
/* Functions for the m68k ELF linker. */
0x2f, 0x3b, 0x01, 0x70, /* move.l (%pc,addr),-(%sp) */
0, 0, 0, 0, /* replaced with offset to .got + 4. */
0x22, 0x7b, 0x01, 0x70, /* moveal %pc@(0xc), %a1 */
- 0, 0, 0, 0, /* replace with offset to .got +8. */
+ 0, 0, 0, 0, /* replace with offset to .got +8. */
0x4e, 0xd1, /* jmp %a1@ */
0, 0, 0, 0, /* pad out to 24 bytes. */
0, 0
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return true;
-
+
in_flags = elf_elfheader (ibfd)->e_flags;
-
+
elf_elfheader (obfd)->e_flags = in_flags;
elf_flags_init (obfd) = true;
-
+
return true;
}
return true;
}
-
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
in regular objects. We allocated space for them in the check_relocs
routine, but we won't fill them in in the relocate_section routine. */
-/*ARGSUSED*/
static boolean
elf_m68k_discard_copies (h, ignore)
struct elf_m68k_link_hash_entry *h;
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
- && (input_section->flags & SEC_ALLOC) != 0
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_68K_32 relocations in its
+ sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& (r_type == R_68K_8
|| r_type == R_68K_16
|| r_type == R_68K_32
+ sgot->output_offset + 8
- (splt->output_section->vma + 10)),
splt->contents + 12);
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
= PLT_ENTRY_SIZE;
}
else /* cpu32 */
+ sgot->output_offset + 8
- (splt->output_section->vma + 10)),
splt->contents + 12);
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
= PLT_CPU32_ENTRY_SIZE;
}
}
if (targetsec != NULL)
strncpy (p + 4, targetsec->output_section->name, 8);
}
-
+
if (free_extsyms != NULL)
free (free_extsyms);
if (free_relocs != NULL)