* libbfd.h, bfd-in2.h: Regenerate.
Merge from mainline
2002-04-26 Alan Modra <amodra@bigpond.net.au>
* opncls.c (bfd_make_readable): Call bfd_section_list_clear.
* xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
* elflink.h (elf_bfd_final_link): Ensure input bfd class is the
same as the output before calling elf_link_input_bfd.
* coffcode.h (coff_compute_section_file_positions): Set
section_tail after shuffling section list.
2002-04-23 Alan Modra <amodra@bigpond.net.au>
* elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
under which a plt call stub is used.
(final_link_relocate): Similarly.
(allocate_plt_static): Clear h-plabel except when plt entry is
exclusively used for a plabel.
(allocate_dynrelocs): Use the above to simplify plt sizing.
(struct elf32_hppa_link_hash_table): Add has_22bit_branch.
(elf32_hppa_link_hash_table_create): Init.
(BL22_RP): Define.
(hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
(elf32_hppa_check_relocs): Set has_22bit_branch.
* elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
(final_link_relocate): Likewise.
2002-04-20 Alan Modra <amodra@bigpond.net.au>
* archures.c (bfd_arch_info): Add comment on list order.
(bfd_default_set_arch_mach): Use bfd_lookup_arch.
* cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
is always at head of list.
* bfd-in2.h: Regenerate.
2002-04-16 Alan Modra <amodra@bigpond.net.au>
* elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
type rather than just assuming entries are ELF.
* elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
* elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
* elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
* elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
rather than elf_link_hash_entry.
2002-04-15 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2002-04-08 Randolph Chung <tausq@debian.org>
* elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
(elf32_hppa_final_link): Split out sorting logic to..
* elf-hppa.h (elf_hppa_sort_unwind): ..here.
(elf_hppa_final_link): Call elf_hppa_sort_unwind.
+2002-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * reloc.c: Move sh relocs to where they belong.
+ * libbfd.h, bfd-in2.h: Regenerate.
+
+ Merge from mainline
+ 2002-04-26 Alan Modra <amodra@bigpond.net.au>
+ * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
+ * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
+ * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
+ same as the output before calling elf_link_input_bfd.
+ * coffcode.h (coff_compute_section_file_positions): Set
+ section_tail after shuffling section list.
+
+ 2002-04-23 Alan Modra <amodra@bigpond.net.au>
+ * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
+ under which a plt call stub is used.
+ (final_link_relocate): Similarly.
+ (allocate_plt_static): Clear h-plabel except when plt entry is
+ exclusively used for a plabel.
+ (allocate_dynrelocs): Use the above to simplify plt sizing.
+ (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
+ (elf32_hppa_link_hash_table_create): Init.
+ (BL22_RP): Define.
+ (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
+ (elf32_hppa_check_relocs): Set has_22bit_branch.
+ * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
+ (final_link_relocate): Likewise.
+
+ 2002-04-20 Alan Modra <amodra@bigpond.net.au>
+ * archures.c (bfd_arch_info): Add comment on list order.
+ (bfd_default_set_arch_mach): Use bfd_lookup_arch.
+ * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
+ is always at head of list.
+ * bfd-in2.h: Regenerate.
+
+ 2002-04-16 Alan Modra <amodra@bigpond.net.au>
+ * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
+ type rather than just assuming entries are ELF.
+ * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
+ * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
+ * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
+ * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
+ rather than elf_link_hash_entry.
+
+ 2002-04-15 Alan Modra <amodra@bigpond.net.au>
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
+
+ 2002-04-08 Randolph Chung <tausq@debian.org>
+ * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
+ (elf32_hppa_final_link): Split out sorting logic to..
+ * elf-hppa.h (elf_hppa_sort_unwind): ..here.
+ (elf_hppa_final_link): Call elf_hppa_sort_unwind.
+
2002-04-26 Richard Smith <richard@ex-parrot.com>
Jakub Jelinek <jakub@redhat.com>
* libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
(elf_bad_symtab): Define new accessor macro.
(_bfd_elf_link_hash_newfunc): Declare.
- (_bew_elf_link_hash_table_init): Declare.
+ (_bfd_elf_link_hash_table_init): Declare.
* elfcode.h (elf_object_p): Call backend object_p hook after
swapping in all the section headers.
(map_program_segments): Correct typo: Internal for External.
. const char *arch_name;
. const char *printable_name;
. unsigned int section_align_power;
-. {* True if this is the default machine for the architecture. *}
+. {* True if this is the default machine for the architecture.
+. The default arch should be the first entry for an arch so that
+. all the entries for that arch can be accessed via <<next>>. *}
. boolean the_default;
. const struct bfd_arch_info * (*compatible)
. PARAMS ((const struct bfd_arch_info *a,
enum bfd_architecture arch;
unsigned long mach;
{
- const bfd_arch_info_type * const *app, *ap;
-
- for (app = bfd_archures_list; *app != NULL; app++)
- {
- for (ap = *app; ap != NULL; ap = ap->next)
- {
- if (ap->arch == arch
- && (ap->mach == mach
- || (mach == 0 && ap->the_default)))
- {
- abfd->arch_info = ap;
- return true;
- }
- }
- }
+ abfd->arch_info = bfd_lookup_arch (arch, mach);
+ if (abfd->arch_info != NULL)
+ return true;
abfd->arch_info = &bfd_default_arch_struct;
bfd_set_error (bfd_error_bad_value);
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
- /* True if this is the default machine for the architecture. */
+ /* True if this is the default machine for the architecture.
+ The default arch should be the first entry for an arch so that
+ all the entries for that arch can be accessed via <<next>>. */
boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
/* i386/elf relocations */
BFD_RELOC_SH_JMP_SLOT,
BFD_RELOC_SH_RELATIVE,
BFD_RELOC_SH_GOTPC,
+ BFD_RELOC_SH_GOT_LOW16,
+ BFD_RELOC_SH_GOT_MEDLOW16,
+ BFD_RELOC_SH_GOT_MEDHI16,
+ BFD_RELOC_SH_GOT_HI16,
+ BFD_RELOC_SH_GOTPLT_LOW16,
+ BFD_RELOC_SH_GOTPLT_MEDLOW16,
+ BFD_RELOC_SH_GOTPLT_MEDHI16,
+ BFD_RELOC_SH_GOTPLT_HI16,
+ BFD_RELOC_SH_PLT_LOW16,
+ BFD_RELOC_SH_PLT_MEDLOW16,
+ BFD_RELOC_SH_PLT_MEDHI16,
+ BFD_RELOC_SH_PLT_HI16,
+ BFD_RELOC_SH_GOTOFF_LOW16,
+ BFD_RELOC_SH_GOTOFF_MEDLOW16,
+ BFD_RELOC_SH_GOTOFF_MEDHI16,
+ BFD_RELOC_SH_GOTOFF_HI16,
+ BFD_RELOC_SH_GOTPC_LOW16,
+ BFD_RELOC_SH_GOTPC_MEDLOW16,
+ BFD_RELOC_SH_GOTPC_MEDHI16,
+ BFD_RELOC_SH_GOTPC_HI16,
+ BFD_RELOC_SH_COPY64,
+ BFD_RELOC_SH_GLOB_DAT64,
+ BFD_RELOC_SH_JMP_SLOT64,
+ BFD_RELOC_SH_RELATIVE64,
+ BFD_RELOC_SH_GOT10BY4,
+ BFD_RELOC_SH_GOT10BY8,
+ BFD_RELOC_SH_GOTPLT10BY4,
+ BFD_RELOC_SH_GOTPLT10BY8,
+ BFD_RELOC_SH_GOTPLT32,
+ BFD_RELOC_SH_SHMEDIA_CODE,
+ BFD_RELOC_SH_IMMU5,
+ BFD_RELOC_SH_IMMS6,
+ BFD_RELOC_SH_IMMS6BY32,
+ BFD_RELOC_SH_IMMU6,
+ BFD_RELOC_SH_IMMS10,
+ BFD_RELOC_SH_IMMS10BY2,
+ BFD_RELOC_SH_IMMS10BY4,
+ BFD_RELOC_SH_IMMS10BY8,
+ BFD_RELOC_SH_IMMS16,
+ BFD_RELOC_SH_IMMU16,
+ BFD_RELOC_SH_IMM_LOW16,
+ BFD_RELOC_SH_IMM_LOW16_PCREL,
+ BFD_RELOC_SH_IMM_MEDLOW16,
+ BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
+ BFD_RELOC_SH_IMM_MEDHI16,
+ BFD_RELOC_SH_IMM_MEDHI16_PCREL,
+ BFD_RELOC_SH_IMM_HI16,
+ BFD_RELOC_SH_IMM_HI16_PCREL,
+ BFD_RELOC_SH_PT_16,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
else
current->target_index = target_index++;
}
+ abfd->section_tail = ¤t->next;
free (section_list);
}
const bfd_arch_info_type bfd_powerpc_archs[] =
{
+#if BFD_DEFAULT_TARGET_SIZE == 64 /* default arch must come first. */
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc64,
+ "powerpc",
+ "powerpc:common64",
+ 3,
+ true, /* default for 64 bit target */
+ powerpc_compatible,
+ bfd_default_scan,
+ &bfd_powerpc_archs[1]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
+ "powerpc",
+ "powerpc:common",
+ 3,
+ false,
+ powerpc_compatible,
+ bfd_default_scan,
+ &bfd_powerpc_archs[2],
+ },
+#else
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
+ "powerpc",
+ "powerpc:common",
+ 3,
+ true, /* default for 32 bit target */
+ powerpc_compatible,
+ bfd_default_scan,
+ &bfd_powerpc_archs[1],
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc64,
+ "powerpc",
+ "powerpc:common64",
+ 3,
+ false,
+ powerpc_compatible,
+ bfd_default_scan,
+ &bfd_powerpc_archs[2]
+ },
+#endif
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[1]
+ &bfd_powerpc_archs[3]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[2]
+ &bfd_powerpc_archs[4]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[3]
+ &bfd_powerpc_archs[5]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[4]
+ &bfd_powerpc_archs[6]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[5]
+ &bfd_powerpc_archs[7]
},
{
64, /* 64 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[6]
+ &bfd_powerpc_archs[8]
},
{
64, /* 64 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[7]
+ &bfd_powerpc_archs[9]
},
{
64, /* 64 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[8]
+ &bfd_powerpc_archs[10]
},
{
64, /* 64 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[9]
+ &bfd_powerpc_archs[11]
},
{
64, /* 64 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[10]
+ &bfd_powerpc_archs[12]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[11]
+ &bfd_powerpc_archs[13]
},
{
32, /* 32 bits in a word */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
- &bfd_powerpc_archs[12]
- },
- {
- 64, /* 64 bits in a word */
- 64, /* 64 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_powerpc,
- bfd_mach_ppc64,
- "powerpc",
- "powerpc:common64",
- 3,
- BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */
- powerpc_compatible,
- bfd_default_scan,
- &bfd_powerpc_archs[13]
- },
- {
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_powerpc,
- bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
- "powerpc",
- "powerpc:common",
- 3,
- BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */
- powerpc_compatible,
- bfd_default_scan,
0
}
};
static void elf_hppa_final_write_processing
PARAMS ((bfd *, boolean));
+static int hppa_unwind_entry_compare
+ PARAMS ((const PTR, const PTR));
+
+static boolean elf_hppa_sort_unwind
+ PARAMS ((bfd *));
+
#if ARCH_SIZE == 64
static boolean elf_hppa_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
static boolean elf_hppa_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+ bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static bfd_reloc_status_type elf_hppa_final_link_relocate
PARAMS ((Elf_Internal_Rela *, bfd *, bfd *, asection *,
- bfd_byte *, bfd_vma, struct bfd_link_info *,
- asection *, struct elf_link_hash_entry *,
+ bfd_byte *, bfd_vma, struct bfd_link_info *,
+ asection *, struct elf_link_hash_entry *,
struct elf64_hppa_dyn_hash_entry *));
static int elf_hppa_relocate_insn
be a section relative relocation. Dwarf2 (for example)
uses 32bit section relative relocations. */
if (bfd_get_arch_info (abfd)->bits_per_address != 32)
- final_type = R_PARISC_SECREL32;
+ final_type = R_PARISC_SECREL32;
break;
case e_psel:
final_type = R_PARISC_PLABEL32;
| EF_PARISC_TRAPNIL);
}
+/* Comparison function for qsort to sort unwind section during a
+ final link. */
+
+static int
+hppa_unwind_entry_compare (a, b)
+ const PTR a;
+ const PTR b;
+{
+ const bfd_byte *ap, *bp;
+ unsigned long av, bv;
+
+ ap = (const bfd_byte *) a;
+ av = (unsigned long) ap[0] << 24;
+ av |= (unsigned long) ap[1] << 16;
+ av |= (unsigned long) ap[2] << 8;
+ av |= (unsigned long) ap[3];
+
+ bp = (const bfd_byte *) b;
+ bv = (unsigned long) bp[0] << 24;
+ bv |= (unsigned long) bp[1] << 16;
+ bv |= (unsigned long) bp[2] << 8;
+ bv |= (unsigned long) bp[3];
+
+ return av < bv ? -1 : av > bv ? 1 : 0;
+}
+
+static boolean elf_hppa_sort_unwind (abfd)
+ bfd *abfd;
+{
+ asection *s;
+
+ /* Magic section names, but this is much safer than having
+ relocate_section remember where SEGREL32 relocs occurred.
+ Consider what happens if someone inept creates a linker script
+ that puts unwind information in .text. */
+ s = bfd_get_section_by_name (abfd, ".PARISC.unwind");
+ if (s != NULL)
+ {
+ bfd_size_type size;
+ char *contents;
+
+ size = s->_raw_size;
+ contents = bfd_malloc (size);
+ if (contents == NULL)
+ return false;
+
+ if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size))
+ return false;
+
+ qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare);
+
+ if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size))
+ return false;
+ }
+
+ return true;
+}
+
#if ARCH_SIZE == 64
/* Hook called by the linker routine which adds symbols from an object
file. HP's libraries define symbols with HP specific section
elf_hppa_remark_useless_dynamic_symbols,
info);
+ /* If we're producing a final executable, sort the contents of the
+ unwind section. */
+ if (retval)
+ retval = elf_hppa_sort_unwind (abfd);
+
return retval;
}
relocation = 0;
}
/* Allow undefined symbols in shared libraries. */
- else if (info->shared && !info->no_undefined
+ else if (info->shared && !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
{
if (info->symbolic)
}
/* We want the value of the OPD offset for this symbol, not
- the symbol's actual address. */
+ the symbol's actual address. */
value = (dyn_h->opd_offset
+ hppa_info->opd_sec->output_offset
+ hppa_info->opd_sec->output_section->vma);
bfd_put_32 (input_bfd, value, hit_data);
else
bfd_put_64 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
}
/* Something we don't know how to handle. */
(single sub-space version)
: addil LR'lt_ptr+ltoff,%dp ; get procedure entry point
: ldw RR'lt_ptr+ltoff(%r1),%r21
- : bv %r0(%r21)
+ : bv %r0(%r21)
: ldw RR'lt_ptr+ltoff+4(%r1),%r19 ; get new dlt value.
Import stub to call shared library routine from shared library
(single sub-space version)
: addil LR'ltoff,%r19 ; get procedure entry point
: ldw RR'ltoff(%r1),%r21
- : bv %r0(%r21)
+ : bv %r0(%r21)
: ldw RR'ltoff+4(%r1),%r19 ; get new dlt value.
Import stub to call shared library routine from normal object file
#endif
} *dyn_relocs;
- /* Set during a static link if we detect a function is PIC. */
- unsigned int maybe_pic_call:1;
-
/* Set if the only reason we need a .plt entry is for a non-PIC to
PIC function call. */
unsigned int pic_call:1;
/* Whether we support multiple sub-spaces for shared libs. */
unsigned int multi_subspace:1;
- /* Flags set when PCREL12F and PCREL17F branches detected. Used to
+ /* Flags set when various size branches are detected. Used to
select suitable defaults for the stub group size. */
unsigned int has_12bit_branch:1;
unsigned int has_17bit_branch:1;
+ unsigned int has_22bit_branch:1;
/* Set if we need a .plt stub to support lazy dynamic linking. */
unsigned int need_plt_stub:1;
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static int hppa_unwind_entry_compare
- PARAMS ((const PTR, const PTR));
-
static boolean elf32_hppa_finish_dynamic_symbol
PARAMS ((bfd *, struct bfd_link_info *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
eh = (struct elf32_hppa_link_hash_entry *) entry;
eh->stub_cache = NULL;
eh->dyn_relocs = NULL;
- eh->maybe_pic_call = 0;
eh->pic_call = 0;
eh->plabel = 0;
}
ret->multi_subspace = 0;
ret->has_12bit_branch = 0;
ret->has_17bit_branch = 0;
+ ret->has_22bit_branch = 0;
ret->need_plt_stub = 0;
ret->sym_sec.abfd = NULL;
unsigned int r_type;
if (hash != NULL
- && (((hash->elf.root.type == bfd_link_hash_defined
- || hash->elf.root.type == bfd_link_hash_defweak)
- && hash->elf.root.u.def.section->output_section == NULL)
- || (hash->elf.root.type == bfd_link_hash_defweak
- && hash->elf.dynindx != -1
- && hash->elf.plt.offset != (bfd_vma) -1)
- || hash->elf.root.type == bfd_link_hash_undefweak
- || hash->elf.root.type == bfd_link_hash_undefined
- || (hash->maybe_pic_call && !(input_sec->flags & SEC_HAS_GOT_REF))))
+ && hash->elf.plt.offset != (bfd_vma) -1
+ && (hash->elf.dynindx != -1 || hash->pic_call)
+ && !hash->plabel)
{
- /* If output_section is NULL, then it's a symbol defined in a
- shared library. We will need an import stub. Decide between
- hppa_stub_import and hppa_stub_import_shared later. For
- shared links we need stubs for undefined or weak syms too;
- They will presumably be resolved by the dynamic linker. */
+ /* We need an import stub. Decide between hppa_stub_import
+ and hppa_stub_import_shared later. */
return hppa_stub_import;
}
#define BE_SR0_R21 0xe2a00000 /* be 0(%sr0,%r21) */
#define STW_RP 0x6bc23fd1 /* stw %rp,-24(%sr0,%sp) */
+#define BL22_RP 0xe800a002 /* b,l,n XXX,%rp */
#define BL_RP 0xe8400002 /* b,l,n XXX,%rp */
#define NOP 0x08000240 /* nop */
#define LDW_RP 0x4bc23fd1 /* ldw -24(%sr0,%sp),%rp */
+ stub_sec->output_offset
+ stub_sec->output_section->vma);
- if (sym_value - 8 + 0x40000 >= 0x80000)
+ if (sym_value - 8 + (1 << (17 + 1)) >= (1 << (17 + 2))
+ && (!htab->has_22bit_branch
+ || sym_value - 8 + (1 << (22 + 1)) >= (1 << (22 + 2))))
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
}
val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_fsel) >> 2;
- insn = hppa_rebuild_insn ((int) BL_RP, val, 17);
+ if (!htab->has_22bit_branch)
+ insn = hppa_rebuild_insn ((int) BL_RP, val, 17);
+ else
+ insn = hppa_rebuild_insn ((int) BL22_RP, val, 22);
bfd_put_32 (stub_bfd, insn, loc);
bfd_put_32 (stub_bfd, (bfd_vma) NOP, loc + 4);
case R_PARISC_PCREL12F:
htab->has_12bit_branch = 1;
- /* Fall thru. */
+ goto branch_common;
+
case R_PARISC_PCREL17C:
case R_PARISC_PCREL17F:
htab->has_17bit_branch = 1;
- /* Fall thru. */
+ goto branch_common;
+
case R_PARISC_PCREL22F:
+ htab->has_22bit_branch = 1;
+ branch_common:
/* Function calls might need to go through the .plt, and
might require long branch stubs. */
if (h == NULL)
case R_PARISC_DIR14F: /* Used for load/store from absolute locn. */
case R_PARISC_DIR14R:
case R_PARISC_DIR21L: /* As above, and for ext branches too. */
-#if 1
+#if 0
/* Help debug shared library creation. Any of the above
relocs can be used in shared libs, but they may cause
pages to become unshared. */
unsigned int power_of_two;
/* If this is a function, put it in the procedure linkage table. We
- will fill in the contents of the procedure linkage table later,
- when we know the address of the .got section. */
+ will fill in the contents of the procedure linkage table later. */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
- if (!info->shared
- && h->plt.refcount > 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0)
- {
- ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1;
- }
-
if (h->plt.refcount <= 0
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
&& h->root.type != bfd_link_hash_defweak
/* As a special sop to the hppa ABI, we keep a .plt entry
for functions in sections containing PIC code. */
- if (((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call)
+ if (!info->shared
+ && h->plt.refcount > 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0)
((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
else
{
}
/* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
}
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1;
((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
return true;
{
/* Make an entry in the .plt section for non-pic code that is
calling pic code. */
+ ((struct elf32_hppa_link_hash_entry *) h)->plabel = 0;
s = htab->splt;
h->plt.offset = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
{
- /* Allocate these later. */
+ /* Allocate these later. From this point on, h->plabel
+ means that the plt entry is only used by a plabel.
+ We'll be using a normal plt entry for this symbol, so
+ clear the plabel indicator. */
+ ((struct elf32_hppa_link_hash_entry *) h)->plabel = 0;
}
else if (((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
if (htab->elf.dynamic_sections_created
&& h->plt.offset != (bfd_vma) -1
&& !((struct elf32_hppa_link_hash_entry *) h)->pic_call
- && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+ && !((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
/* Make an entry in the .plt section. */
s = htab->splt;
bfd *abfd;
struct bfd_link_info *info;
{
- asection *s;
-
/* Invoke the regular ELF linker to do all the work. */
if (!bfd_elf32_bfd_final_link (abfd, info))
return false;
/* If we're producing a final executable, sort the contents of the
- unwind section. Magic section names, but this is much safer than
- having elf32_hppa_relocate_section remember where SEGREL32 relocs
- occurred. Consider what happens if someone inept creates a
- linker script that puts unwind information in .text. */
- s = bfd_get_section_by_name (abfd, ".PARISC.unwind");
- if (s != NULL)
- {
- bfd_size_type size;
- char *contents;
-
- size = s->_raw_size;
- contents = bfd_malloc (size);
- if (contents == NULL)
- return false;
-
- if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size))
- return false;
-
- qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare);
-
- if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size))
- return false;
- }
- return true;
+ unwind section. */
+ return elf_hppa_sort_unwind (abfd);
}
/* Record the lowest address for the data and text segments. */
case R_PARISC_PCREL12F:
case R_PARISC_PCREL17F:
case R_PARISC_PCREL22F:
- /* If this is a call to a function defined in another dynamic
- library, or if it is a call to a PIC function in the same
- object, or if this is a shared link and it is a call to a
- weak symbol which may or may not be in the same object, then
- find the import stub in the stub hash. */
+ /* If this call should go via the plt, find the import stub in
+ the stub hash. */
if (sym_sec == NULL
|| sym_sec->output_section == NULL
|| (h != NULL
- && ((h->maybe_pic_call
- && !(input_section->flags & SEC_HAS_GOT_REF))
- || (h->elf.root.type == bfd_link_hash_defweak
- && h->elf.dynindx != -1
- && h->elf.plt.offset != (bfd_vma) -1))))
+ && h->elf.plt.offset != (bfd_vma) -1
+ && (h->elf.dynindx != -1 || h->pic_call)
+ && !h->plabel))
{
stub_entry = hppa_get_stub_entry (input_section, sym_sec,
h, rel, htab);
== (((int) OP_ADDIL << 26) | (27 << 21)))
{
insn &= ~ (0x1f << 21);
-#if 1 /* debug them. */
+#if 0 /* debug them. */
(*_bfd_error_handler)
(_("%s(%s+0x%lx): fixing %s"),
bfd_archive_filename (input_bfd),
return true;
}
-/* Comparison function for qsort to sort unwind section during a
- final link. */
-
-static int
-hppa_unwind_entry_compare (a, b)
- const PTR a;
- const PTR b;
-{
- const bfd_byte *ap, *bp;
- unsigned long av, bv;
-
- ap = (const bfd_byte *) a;
- av = (unsigned long) ap[0] << 24;
- av |= (unsigned long) ap[1] << 16;
- av |= (unsigned long) ap[2] << 8;
- av |= (unsigned long) ap[3];
-
- bp = (const bfd_byte *) b;
- bv = (unsigned long) bp[0] << 24;
- bv |= (unsigned long) bp[1] << 16;
- bv |= (unsigned long) bp[2] << 8;
- bv |= (unsigned long) bp[3];
-
- return av < bv ? -1 : av > bv ? 1 : 0;
-}
-
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
{
if (! info->relocateable
&& (*namep)[0] == '_' && (*namep)[1] == 'S'
- && strcmp (*namep, "_SDA_BASE_") == 0)
+ && strcmp (*namep, "_SDA_BASE_") == 0
+ && info->hash->creator->flavour == bfd_target_elf_flavour)
{
/* This is simpler than using _bfd_elf_create_linker_section
(our needs are simpler than ppc's needs). Also
{
if (sym->st_shndx == SHN_COMMON
&& !info->relocateable
- && sym->st_size <= elf_gp_size (abfd))
+ && sym->st_size <= elf_gp_size (abfd)
+ && info->hash->creator->flavour == bfd_target_elf_flavour)
{
/* Common symbols less than or equal to -G nn bytes are automatically
put into .sdata. */
bfd_vma *valp;
{
/* We want to do this for relocatable as well as final linking. */
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
+ if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
+ && info->hash->creator->flavour == bfd_target_elf_flavour)
{
struct elf_link_hash_entry *h;
strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)) == 0)
{
/* See if we have another one. */
- struct elf_link_hash_entry *h
- = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash,
- *namep,
- false,
- false, false);
+ struct bfd_link_hash_entry *h = bfd_link_hash_lookup (info->hash,
+ *namep,
+ false,
+ false,
+ false);
- if (h != NULL && h->root.type != bfd_link_hash_undefined)
+ if (h != NULL && h->type != bfd_link_hash_undefined)
{
/* How do we get the asymbol (or really: the filename) from h?
- h->root.u.def.section->owner is NULL. */
+ h->u.def.section->owner is NULL. */
((*_bfd_error_handler)
(_("%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"),
bfd_get_filename (abfd), *namep,
bfd_vma *valp;
{
/* We want to do this for relocatable as well as final linking. */
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
+ if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
+ && info->hash->creator->flavour == bfd_target_elf_flavour)
{
struct elf_link_hash_entry *h;
/* SPARC-specific support for 64-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
*namep = NULL;
return true;
}
- else if (! *namep || ! **namep)
- return true;
- else
+ else if (*namep && **namep
+ && info->hash->creator->flavour == bfd_target_elf_flavour)
{
int i;
struct sparc64_elf_app_reg *p;
{
for (p = o->link_order_head; p != NULL; p = p->next)
{
- Elf_Internal_Shdr *rhdr;
-
if (p->type == bfd_indirect_link_order
- && (bfd_get_flavour (p->u.indirect.section->owner)
+ && (bfd_get_flavour ((sub = p->u.indirect.section->owner))
== bfd_target_elf_flavour)
- && (((rhdr = &elf_section_data (p->u.indirect.section)->rel_hdr)
- ->sh_entsize == 0)
- || rhdr->sh_entsize == sizeof (Elf_External_Rel)
- || rhdr->sh_entsize == sizeof (Elf_External_Rela))
- && (((rhdr = elf_section_data (p->u.indirect.section)->rel_hdr2)
- == NULL)
- || rhdr->sh_entsize == sizeof (Elf_External_Rel)
- || rhdr->sh_entsize == sizeof (Elf_External_Rela)))
+ && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass)
{
- sub = p->u.indirect.section->owner;
if (! sub->output_has_begun)
{
if (! elf_link_input_bfd (&finfo, sub))
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
- "BFD_RELOC_SH_GOT_LOW16",
- "BFD_RELOC_SH_GOT_MEDLOW16",
- "BFD_RELOC_SH_GOT_MEDHI16",
- "BFD_RELOC_SH_GOT_HI16",
- "BFD_RELOC_SH_GOTPLT_LOW16",
- "BFD_RELOC_SH_GOTPLT_MEDLOW16",
- "BFD_RELOC_SH_GOTPLT_MEDHI16",
- "BFD_RELOC_SH_GOTPLT_HI16",
- "BFD_RELOC_SH_PLT_LOW16",
- "BFD_RELOC_SH_PLT_MEDLOW16",
- "BFD_RELOC_SH_PLT_MEDHI16",
- "BFD_RELOC_SH_PLT_HI16",
- "BFD_RELOC_SH_GOTOFF_LOW16",
- "BFD_RELOC_SH_GOTOFF_MEDLOW16",
- "BFD_RELOC_SH_GOTOFF_MEDHI16",
- "BFD_RELOC_SH_GOTOFF_HI16",
- "BFD_RELOC_SH_GOTPC_LOW16",
- "BFD_RELOC_SH_GOTPC_MEDLOW16",
- "BFD_RELOC_SH_GOTPC_MEDHI16",
- "BFD_RELOC_SH_GOTPC_HI16",
- "BFD_RELOC_SH_COPY64",
- "BFD_RELOC_SH_GLOB_DAT64",
- "BFD_RELOC_SH_JMP_SLOT64",
- "BFD_RELOC_SH_RELATIVE64",
- "BFD_RELOC_SH_GOT10BY4",
- "BFD_RELOC_SH_GOT10BY8",
- "BFD_RELOC_SH_GOTPLT10BY4",
- "BFD_RELOC_SH_GOTPLT10BY8",
- "BFD_RELOC_SH_GOTPLT32",
- "BFD_RELOC_SH_SHMEDIA_CODE",
- "BFD_RELOC_SH_IMMU5",
- "BFD_RELOC_SH_IMMS6",
- "BFD_RELOC_SH_IMMS6BY32",
- "BFD_RELOC_SH_IMMU6",
- "BFD_RELOC_SH_IMMS10",
- "BFD_RELOC_SH_IMMS10BY2",
- "BFD_RELOC_SH_IMMS10BY4",
- "BFD_RELOC_SH_IMMS10BY8",
- "BFD_RELOC_SH_IMMS16",
- "BFD_RELOC_SH_IMMU16",
- "BFD_RELOC_SH_IMM_LOW16",
- "BFD_RELOC_SH_IMM_LOW16_PCREL",
- "BFD_RELOC_SH_IMM_MEDLOW16",
- "BFD_RELOC_SH_IMM_MEDLOW16_PCREL",
- "BFD_RELOC_SH_IMM_MEDHI16",
- "BFD_RELOC_SH_IMM_MEDHI16_PCREL",
- "BFD_RELOC_SH_IMM_HI16",
- "BFD_RELOC_SH_IMM_HI16_PCREL",
- "BFD_RELOC_SH_PT_16",
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",
"BFD_RELOC_SH_JMP_SLOT",
"BFD_RELOC_SH_RELATIVE",
"BFD_RELOC_SH_GOTPC",
+ "BFD_RELOC_SH_GOT_LOW16",
+ "BFD_RELOC_SH_GOT_MEDLOW16",
+ "BFD_RELOC_SH_GOT_MEDHI16",
+ "BFD_RELOC_SH_GOT_HI16",
+ "BFD_RELOC_SH_GOTPLT_LOW16",
+ "BFD_RELOC_SH_GOTPLT_MEDLOW16",
+ "BFD_RELOC_SH_GOTPLT_MEDHI16",
+ "BFD_RELOC_SH_GOTPLT_HI16",
+ "BFD_RELOC_SH_PLT_LOW16",
+ "BFD_RELOC_SH_PLT_MEDLOW16",
+ "BFD_RELOC_SH_PLT_MEDHI16",
+ "BFD_RELOC_SH_PLT_HI16",
+ "BFD_RELOC_SH_GOTOFF_LOW16",
+ "BFD_RELOC_SH_GOTOFF_MEDLOW16",
+ "BFD_RELOC_SH_GOTOFF_MEDHI16",
+ "BFD_RELOC_SH_GOTOFF_HI16",
+ "BFD_RELOC_SH_GOTPC_LOW16",
+ "BFD_RELOC_SH_GOTPC_MEDLOW16",
+ "BFD_RELOC_SH_GOTPC_MEDHI16",
+ "BFD_RELOC_SH_GOTPC_HI16",
+ "BFD_RELOC_SH_COPY64",
+ "BFD_RELOC_SH_GLOB_DAT64",
+ "BFD_RELOC_SH_JMP_SLOT64",
+ "BFD_RELOC_SH_RELATIVE64",
+ "BFD_RELOC_SH_GOT10BY4",
+ "BFD_RELOC_SH_GOT10BY8",
+ "BFD_RELOC_SH_GOTPLT10BY4",
+ "BFD_RELOC_SH_GOTPLT10BY8",
+ "BFD_RELOC_SH_GOTPLT32",
+ "BFD_RELOC_SH_SHMEDIA_CODE",
+ "BFD_RELOC_SH_IMMU5",
+ "BFD_RELOC_SH_IMMS6",
+ "BFD_RELOC_SH_IMMS6BY32",
+ "BFD_RELOC_SH_IMMU6",
+ "BFD_RELOC_SH_IMMS10",
+ "BFD_RELOC_SH_IMMS10BY2",
+ "BFD_RELOC_SH_IMMS10BY4",
+ "BFD_RELOC_SH_IMMS10BY8",
+ "BFD_RELOC_SH_IMMS16",
+ "BFD_RELOC_SH_IMMU16",
+ "BFD_RELOC_SH_IMM_LOW16",
+ "BFD_RELOC_SH_IMM_LOW16_PCREL",
+ "BFD_RELOC_SH_IMM_MEDLOW16",
+ "BFD_RELOC_SH_IMM_MEDLOW16_PCREL",
+ "BFD_RELOC_SH_IMM_MEDHI16",
+ "BFD_RELOC_SH_IMM_MEDHI16_PCREL",
+ "BFD_RELOC_SH_IMM_HI16",
+ "BFD_RELOC_SH_IMM_HI16_PCREL",
+ "BFD_RELOC_SH_PT_16",
"BFD_RELOC_THUMB_PCREL_BRANCH9",
"BFD_RELOC_THUMB_PCREL_BRANCH12",
"BFD_RELOC_THUMB_PCREL_BRANCH23",
/* opncls.c -- open and close a BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
abfd->arch_info = &bfd_default_arch_struct;
abfd->where = 0;
- abfd->sections = (asection *) NULL;
abfd->format = bfd_unknown;
abfd->my_archive = (bfd *) NULL;
abfd->origin = 0;
abfd->outsymbols = 0;
abfd->tdata.any = 0;
+ bfd_section_list_clear (abfd);
bfd_check_format(abfd, bfd_object);
return true;
BFD_RELOC_MIPS_JALR
COMMENT
COMMENT
-ENUMX
- BFD_RELOC_SH_GOT_LOW16
-ENUMX
- BFD_RELOC_SH_GOT_MEDLOW16
-ENUMX
- BFD_RELOC_SH_GOT_MEDHI16
-ENUMX
- BFD_RELOC_SH_GOT_HI16
-ENUMX
- BFD_RELOC_SH_GOTPLT_LOW16
-ENUMX
- BFD_RELOC_SH_GOTPLT_MEDLOW16
-ENUMX
- BFD_RELOC_SH_GOTPLT_MEDHI16
-ENUMX
- BFD_RELOC_SH_GOTPLT_HI16
-ENUMX
- BFD_RELOC_SH_PLT_LOW16
-ENUMX
- BFD_RELOC_SH_PLT_MEDLOW16
-ENUMX
- BFD_RELOC_SH_PLT_MEDHI16
-ENUMX
- BFD_RELOC_SH_PLT_HI16
-ENUMX
- BFD_RELOC_SH_GOTOFF_LOW16
-ENUMX
- BFD_RELOC_SH_GOTOFF_MEDLOW16
-ENUMX
- BFD_RELOC_SH_GOTOFF_MEDHI16
-ENUMX
- BFD_RELOC_SH_GOTOFF_HI16
-ENUMX
- BFD_RELOC_SH_GOTPC_LOW16
-ENUMX
- BFD_RELOC_SH_GOTPC_MEDLOW16
-ENUMX
- BFD_RELOC_SH_GOTPC_MEDHI16
-ENUMX
- BFD_RELOC_SH_GOTPC_HI16
-ENUMX
- BFD_RELOC_SH_COPY64
-ENUMX
- BFD_RELOC_SH_GLOB_DAT64
-ENUMX
- BFD_RELOC_SH_JMP_SLOT64
-ENUMX
- BFD_RELOC_SH_RELATIVE64
-ENUMX
- BFD_RELOC_SH_GOT10BY4
-ENUMX
- BFD_RELOC_SH_GOT10BY8
-ENUMX
- BFD_RELOC_SH_GOTPLT10BY4
-ENUMX
- BFD_RELOC_SH_GOTPLT10BY8
-ENUMX
- BFD_RELOC_SH_GOTPLT32
-COMMENT
-ENUMX
- BFD_RELOC_SH_SHMEDIA_CODE
-ENUMX
- BFD_RELOC_SH_IMMU5
-ENUMX
- BFD_RELOC_SH_IMMS6
-ENUMX
- BFD_RELOC_SH_IMMS6BY32
-ENUMX
- BFD_RELOC_SH_IMMU6
-ENUMX
- BFD_RELOC_SH_IMMS10
-ENUMX
- BFD_RELOC_SH_IMMS10BY2
-ENUMX
- BFD_RELOC_SH_IMMS10BY4
-ENUMX
- BFD_RELOC_SH_IMMS10BY8
-ENUMX
- BFD_RELOC_SH_IMMS16
-ENUMX
- BFD_RELOC_SH_IMMU16
-ENUMX
- BFD_RELOC_SH_IMM_LOW16
-ENUMX
- BFD_RELOC_SH_IMM_LOW16_PCREL
-ENUMX
- BFD_RELOC_SH_IMM_MEDLOW16
-ENUMX
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL
-ENUMX
- BFD_RELOC_SH_IMM_MEDHI16
-ENUMX
- BFD_RELOC_SH_IMM_MEDHI16_PCREL
-ENUMX
- BFD_RELOC_SH_IMM_HI16
-ENUMX
- BFD_RELOC_SH_IMM_HI16_PCREL
-ENUMX
- BFD_RELOC_SH_PT_16
-COMMENT
ENUMDOC
MIPS ELF relocations.
BFD_RELOC_SH_RELATIVE
ENUMX
BFD_RELOC_SH_GOTPC
+ENUMX
+ BFD_RELOC_SH_GOT_LOW16
+ENUMX
+ BFD_RELOC_SH_GOT_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_GOT_MEDHI16
+ENUMX
+ BFD_RELOC_SH_GOT_HI16
+ENUMX
+ BFD_RELOC_SH_GOTPLT_LOW16
+ENUMX
+ BFD_RELOC_SH_GOTPLT_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_GOTPLT_MEDHI16
+ENUMX
+ BFD_RELOC_SH_GOTPLT_HI16
+ENUMX
+ BFD_RELOC_SH_PLT_LOW16
+ENUMX
+ BFD_RELOC_SH_PLT_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_PLT_MEDHI16
+ENUMX
+ BFD_RELOC_SH_PLT_HI16
+ENUMX
+ BFD_RELOC_SH_GOTOFF_LOW16
+ENUMX
+ BFD_RELOC_SH_GOTOFF_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_GOTOFF_MEDHI16
+ENUMX
+ BFD_RELOC_SH_GOTOFF_HI16
+ENUMX
+ BFD_RELOC_SH_GOTPC_LOW16
+ENUMX
+ BFD_RELOC_SH_GOTPC_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_GOTPC_MEDHI16
+ENUMX
+ BFD_RELOC_SH_GOTPC_HI16
+ENUMX
+ BFD_RELOC_SH_COPY64
+ENUMX
+ BFD_RELOC_SH_GLOB_DAT64
+ENUMX
+ BFD_RELOC_SH_JMP_SLOT64
+ENUMX
+ BFD_RELOC_SH_RELATIVE64
+ENUMX
+ BFD_RELOC_SH_GOT10BY4
+ENUMX
+ BFD_RELOC_SH_GOT10BY8
+ENUMX
+ BFD_RELOC_SH_GOTPLT10BY4
+ENUMX
+ BFD_RELOC_SH_GOTPLT10BY8
+ENUMX
+ BFD_RELOC_SH_GOTPLT32
+ENUMX
+ BFD_RELOC_SH_SHMEDIA_CODE
+ENUMX
+ BFD_RELOC_SH_IMMU5
+ENUMX
+ BFD_RELOC_SH_IMMS6
+ENUMX
+ BFD_RELOC_SH_IMMS6BY32
+ENUMX
+ BFD_RELOC_SH_IMMU6
+ENUMX
+ BFD_RELOC_SH_IMMS10
+ENUMX
+ BFD_RELOC_SH_IMMS10BY2
+ENUMX
+ BFD_RELOC_SH_IMMS10BY4
+ENUMX
+ BFD_RELOC_SH_IMMS10BY8
+ENUMX
+ BFD_RELOC_SH_IMMS16
+ENUMX
+ BFD_RELOC_SH_IMMU16
+ENUMX
+ BFD_RELOC_SH_IMM_LOW16
+ENUMX
+ BFD_RELOC_SH_IMM_LOW16_PCREL
+ENUMX
+ BFD_RELOC_SH_IMM_MEDLOW16
+ENUMX
+ BFD_RELOC_SH_IMM_MEDLOW16_PCREL
+ENUMX
+ BFD_RELOC_SH_IMM_MEDHI16
+ENUMX
+ BFD_RELOC_SH_IMM_MEDHI16_PCREL
+ENUMX
+ BFD_RELOC_SH_IMM_HI16
+ENUMX
+ BFD_RELOC_SH_IMM_HI16_PCREL
+ENUMX
+ BFD_RELOC_SH_PT_16
ENUMDOC
Hitachi SH relocs. Not all of these appear in object files.
/* Remove the sections from this object, so that they do not get
included in the link. */
- abfd->sections = NULL;
+ bfd_section_list_clear (abfd);
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);