* coff64-rs6000.c: Fix formatting.
* coff-arm.c: Likewise.
* coffgen.c: Likewise.
* cofflink.c: Likewise.
* coff-mcore.c: Likewise.
* coff-mips.c: Likewise.
* coff-pmac.c: Likewise.
* coff-ppc.c: Likewise.
* coff-rs6000.c: Likewise.
* elf32.c: Likewise.
* elf32-fr30.c: Likewise.
* elf32-i370.c: Likewise.
* elf32-i860.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-mcore.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-v850.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-sparc.c: Likewise.
* elflink.c: Likewise.
* elflink.h: Likewise.
* elf-m10200.c: Likewise.
* elf-m10300.c: Likewise.
* elfxx-ia64.c: Likewise.
+2001-01-23 Kazu Hirata <kazu@hxi.com>
+
+ * coff64-rs6000.c: Fix formatting.
+ * coff-arm.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-pmac.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * elf32.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
2001-01-22 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Added PIC support for X86-64.
return br_insn;
}
-
\f
static struct coff_link_hash_entry *
find_thumb_glue (info, name, input_bfd)
/* Target vectors. */
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM)
CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM)
-
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
from smaller values. Start with zero, widen, *then* decrement. */
#define MINUS_ONE (((bfd_vma)0) - 1)
-
\f
static reloc_howto_type mcore_coff_howto_table[] =
{
return bfd_reloc_notsupported;
}
-
\f
/* A cheesy little macro to make the code a little more readable. */
#define HOW2MAP(bfd_rtype, mcore_rtype) \
{
return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA;
}
-
\f
/* The reloc processing routine for the optimized COFF linker. */
static boolean
return true;
}
-
\f
/* Tailor coffcode.h -- macro heaven. */
bfd_byte *, bfd_vma));
static reloc_howto_type *mips_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
-
\f
/* ECOFF has COFF sections, but the debugging information is stored in
a completely different format. ECOFF targets use some of the
#include "coff/rs6000.h"
#include "libcoff.h"
#include "xcoff-target.h"
-
/* Now, tailor coffcode.h to use our hash stuff */
#define coff_bfd_link_hash_table_create ppc_coff_link_hash_table_create
-
\f
/* The nt loader points the toc register to &toc + 32768, in order to */
/* use the complete range of a 16-bit displacement. We have to adjust */
#define EXTRACT_FLAGS(x) ((x) & IMAGE_REL_PPC_FLAGMASK)
#define EXTRACT_JUNK(x) \
((x) & ~(IMAGE_REL_PPC_TYPEMASK | IMAGE_REL_PPC_FLAGMASK))
-
\f
/* static helper functions to make relocation work */
/* (Work In Progress) */
asection *section,
bfd *output_bfd,
char **error));
-
\f
static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
arelent *reloc,
char **error));
static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
-
\f
/* FIXME: It'll take a while to get through all of these. I only need a few to
get us started, so those I'll make sure work. Those marked FIXME are either
false), /* pcrel_offset */
};
-
\f
-
/* Some really cheezy macros that can be turned on to test stderr :-) */
#ifdef DEBUG_RELOC
#define DUMP_RELOC(n,r)
#define DUMP_RELOC2(n,r)
#endif
-
\f
/* toc construction and management routines */
#endif /* COFF_IMAGE_WITH_PE */
\f
-
/* Return true if this relocation should
appear in the output .reloc section. */
return bfd_reloc_undefined;
}
-
\f
static bfd_reloc_status_type
ppc_toc16_reloc (abfd,
return bfd_reloc_ok;
}
-
\f
-
#define MAX_RELOC_INDEX \
(sizeof (ppc_coff_howto_table) / sizeof (ppc_coff_howto_table[0]) - 1)
}
#undef HOW2MAP
-
\f
/* Tailor coffcode.h -- macro heaven. */
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 1 }
#include "coffcode.h"
-
\f
-
#ifndef COFF_IMAGE_WITH_PE
/* FIXME:
What we're trying to do here is allocate a toc section (early), and attach
}
#endif
\f
-
/* Forward declaration for use by alternative_target field. */
#ifdef TARGET_BIG_SYM
extern const bfd_target TARGET_BIG_SYM;
return false;
}
\f
-
void
_bfd_xcoff_swap_sym_in (abfd, ext1, in1)
bfd *abfd;
end:
return bfd_coff_auxesz (abfd);
}
-
\f
/* The XCOFF reloc table. Actually, XCOFF relocations specify the
bitsize and whether they are signed or not, along with a
return NULL;
}
}
-
\f
/* XCOFF archive support. The original version of this code was by
Damon A. Permezel. It was enhanced to permit cross support, and
#define TARGET_SYM rs6000coff64_vec
#include "xcoff-target.h"
-
return bfd_reloc_notsupported;
}
}
-
\f
/* Relocate an MN10200 ELF section. */
static boolean
return bfd_reloc_notsupported;
}
}
-
\f
/* Relocate an MN10300 ELF section. */
static boolean
return bfd_reloc_ok;
}
-
\f
/* Utility to actually perform a R_FR30_48 reloc. */
return r;
}
-
\f
/* Relocate an FR30 ELF section.
There is some attempt to make this function usable for many architectures,
R_I370_max
};
-
\f
static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ];
false), /* pcrel_offset */
};
-
\f
static void i370_elf_howto_init PARAMS ((void));
static void i370_elf_info_to_howto PARAMS ((bfd *abfd, arelent *cache_ptr,
Elf32_Internal_Rela *dst));
static boolean i370_elf_set_private_flags PARAMS ((bfd *, flagword));
-
\f
/* Initialize the i370_elf_howto_table, so that linear accesses can be done. */
i370_elf_howto_table[type] = &i370_elf_howto_raw[i];
}
}
-
\f
static reloc_howto_type *
i370_elf_reloc_type_lookup (abfd, code)
return true;
}
-
\f
/* Handle an i370 specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type. */
bfd_set_section_flags (abfd, newsect, flags);
return true;
}
-
\f
/* Set up any other section flags and such that may be necessary. */
/* XXX hack alert bogus This routine is mostly all junk and almost
return true;
}
-
\f
#if 0
/* Create a special linker section */
return true;
}
-
\f
/* Increment the index of a dynamic symbol by a given amount. Called
via elf_link_hash_traverse. */
return true;
}
-
\f
/* Set the sizes of the dynamic sections. */
/* XXX hack alert bogus This routine is mostly all junk and almost
return true;
}
-
\f
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
return true;
}
-
\f
/* Finish up the dynamic sections. */
/* XXX hack alert bogus This routine is mostly all junk and almost
return true;
}
-
\f
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
};
-
\f
static unsigned char elf_code_to_howto_index[R_860_max + 1];
{
bfd_reloc->howto = lookup_howto (ELF32_R_TYPE (elf_reloc->r_info));
}
-
\f
/* Specialized relocation handler for R_860_SPLITn. These relocations
involves a 16-bit field that is split into two contiguous parts. */
return _bfd_elf_is_local_label_name (abfd, name);
}
-
\f
#define TARGET_BIG_SYM bfd_elf32_i860_vec
#define TARGET_BIG_NAME "elf32-i860"
return true;
}
-
\f
-
#define ELF_ARCH bfd_arch_m32r
#define ELF_MACHINE_CODE EM_CYGNUS_M32R
#define ELF_MAXPAGESIZE 0x1 /* Explicitly requested by Mitsubishi. */
/* end code generated by elf.el */
#define USE_RELA
-
\f
/* Functions for the m68k ELF linker. */
mcore_elf_howto_table [type] = & mcore_elf_howto_raw [i];
}
}
-
\f
static reloc_howto_type *
mcore_elf_reloc_type_lookup (abfd, code)
return true;
}
-
\f
/* Don't pretend we can deal with unsupported relocs. */
return bfd_reloc_notsupported;
}
-
\f
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
return true;
}
-
\f
/* Handle a PowerPC specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type. */
bfd_set_section_flags (abfd, newsect, flags);
return true;
}
-
\f
/* Set up any other section flags and such that may be necessary. */
return true;
}
-
\f
/* Create a special linker section */
static elf_linker_section_t *
return true;
}
-
\f
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
return true;
}
-
\f
/* Relocate an SH ELF section. */
{ BFD_RELOC_VTABLE_ENTRY, R_V850_GNU_VTENTRY },
};
-
\f
/* Map a bfd relocation into the appropriate howto structure */
static reloc_howto_type *
return NULL;
}
-
\f
/* Set the howto pointer for an V850 ELF reloc. */
static void
BFD_ASSERT (r_type < (unsigned int) R_V850_max);
cache_ptr->howto = &v850_elf_howto_table[r_type];
}
-
\f
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
bfd_put_16 (abfd, insn, address);
return bfd_reloc_ok;
}
-
\f
/* Insert the addend into the instruction. */
static bfd_reloc_status_type
reloc->addend = relocation;
return bfd_reloc_ok;
}
-
\f
static boolean
v850_elf_is_local_label_name (abfd, name)
return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.'))
|| (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_'));
}
-
\f
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
/* Perform the relocation. */
return v850_elf_perform_relocation (input_bfd, r_type, value + addend, hit_data);
}
-
\f
/* Relocate an V850 ELF section. */
static boolean
return true;
}
-
\f
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
#define TARGET_LITTLE_NAME "elf32-v850"
#define ARCH_SIZE 32
-
#include "elfcode.h"
PARAMS((struct alpha_elf_link_hash_entry *, PTR));
static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs
PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int));
-
\f
struct alpha_elf_link_hash_entry
{
return &ret->root.root;
}
-
\f
/* Utility for performing the standard initial work of an instruction
relocation.
+ last * 6*4
+ ofs * 8);
}
-
\f
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
return true;
}
\f
-
/* Create dynamic sections when linking against a dynamic object. */
boolean
return true;
}
\f
-
/* Record a new dynamic symbol. We record the dynamic symbols as we
read the input files, since we need to have a list of all of them
before we can determine the final sizes of the output sections.
return lsect;
}
-
\f
/* Find a linker generated pointer with a given addend and type. */
return (elf_linker_section_pointers_t *)0;
}
-
\f
/* Make the .rela section corresponding to the generated linker section. */
return result;
}
\f
-
/* Add symbols from an ELF archive file to the linker hash table. We
don't use _bfd_generic_link_add_archive_symbols because of a
problem which arises on UnixWare. The UnixWare libc.so is an
return true;
}
\f
-
/* Read and swap the relocs from the section indicated by SHDR. This
may be either a REL or a RELA section. The relocations are
translated into RELA relocations and stored in INTERNAL_RELOCS,
return NULL;
}
\f
-
/* Record an assignment to a symbol made by a linker script. We need
this in case some dynamic object refers to this symbol. */
return true;
}
-
\f
/* Allocate a pointer to live in a linker created section. */
return true;
}
-
\f
#if ARCH_SIZE==64
#define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_64 (BFD, VAL, ADDR)
PARAMS ((bfd *ibfd, bfd *obfd));
static boolean elfNN_ia64_print_private_bfd_data
PARAMS ((bfd *abfd, PTR ptr));
-
\f
/* ia64-specific relocation */