/* BFD back-end for HP PA-RISC ELF files.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by
#include "elf32-hppa.h"
#include "hppa_stubs.h"
-static bfd_reloc_status_type hppa_elf_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
static unsigned long hppa_elf_relocate_insn
PARAMS ((bfd *, asection *, unsigned long, unsigned long, long,
long, unsigned long, unsigned long, unsigned long));
-static bfd_reloc_status_type hppa_elf_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd*, char **));
-
-static boolean hppa_elf_is_local_label_name PARAMS ((bfd *, const char *));
-
static boolean elf32_hppa_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
const char **, flagword *, asection **, bfd_vma *));
return true;
}
-/* Actually perform a relocation. NOTE this is (mostly) superceeded
- by elf32_hppa_bfd_final_link_relocate which is called by the new
- fast linker. */
-
-static bfd_reloc_status_type
-hppa_elf_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- /* It is no longer valid to call hppa_elf_reloc when creating
- a final executable. */
- if (output_bfd)
- {
- reloc_entry->address += input_section->output_offset;
-
- /* Work around lossage in generic elf code to write relocations.
- (maps different section symbols into the same symbol index). */
- if ((symbol_in->flags & BSF_SECTION_SYM)
- && symbol_in->section)
- reloc_entry->addend += symbol_in->section->output_offset;
- return bfd_reloc_ok;
- }
- else
- {
- *error_message = (char *) _("Unsupported call to hppa_elf_reloc");
- return bfd_reloc_notsupported;
- }
-}
-
/* Actually perform a relocation as part of a final link. This can get
rather hairy when linker stubs are needed. */
addend, info, sym_sec, sym_name, is_local)
reloc_howto_type *howto;
bfd *input_bfd;
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
asection *input_section;
bfd_byte *contents;
bfd_vma offset;
case R_PARISC_PCREL17F:
{
bfd_vma location;
- unsigned int len, caller_args, callee_args;
+ unsigned int len;
char *new_name, *stub_name;
/* Get the field selector right. We'll need it in a minute. */
return (bfd_reloc_ok);
}
-/* Return true if SYM represents a local label symbol. */
-
-static boolean
-hppa_elf_is_local_label_name (abfd, name)
- bfd *abfd;
- const char *name;
-{
- return (name[0] == 'L' && name[1] == '$');
-}
-
/* Undo the generic ELF code's subtraction of section->vma from the
value of each external symbol. */
static boolean
elf32_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- const Elf_Internal_Sym *sym;
- const char **namep;
- flagword *flagsp;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ const Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
+ const char **namep ATTRIBUTE_UNUSED;
+ flagword *flagsp ATTRIBUTE_UNUSED;
asection **secp;
bfd_vma *valp;
{
static void
elf32_hppa_name_of_stub (location, destination, stub_name)
- bfd_vma location, destination;
+ bfd_vma location ATTRIBUTE_UNUSED;
+ bfd_vma destination ATTRIBUTE_UNUSED;
char *stub_name;
{
strcpy (stub_name, "_____long_branch_stub_");
boolean
elf32_hppa_size_stubs (stub_bfd, output_bfd, link_info)
bfd *stub_bfd;
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *link_info;
{
bfd *input_bfd;
asection *section, *stub_sec = 0;
Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Sym *local_syms, *isym, **all_local_syms;
- Elf32_External_Sym *ext_syms, *esym;
+ Elf_Internal_Sym *local_syms, **all_local_syms;
unsigned int i, index, bfd_count = 0;
struct elf32_hppa_stub_hash_table *stub_hash_table = 0;
/* Misc BFD support code. */
#define bfd_elf32_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup
-#define bfd_elf32_bfd_is_local_label_name hppa_elf_is_local_label_name
+#define bfd_elf32_bfd_is_local_label_name elf_hppa_is_local_label_name
#define elf_info_to_howto elf_hppa_info_to_howto
#define elf_info_to_howto_rel elf_hppa_info_to_howto_rel
#define elf_backend_add_symbol_hook elf32_hppa_add_symbol_hook
#define bfd_elf32_bfd_link_hash_table_create \
elf32_hppa_link_hash_table_create
+#define elf_backend_fake_sections elf_hppa_fake_sections
+
#define TARGET_BIG_SYM bfd_elf32_hppa_vec
#define TARGET_BIG_NAME "elf32-hppa"