* elf32-d30v.c: Likewise.
* elf32-dlx.c: Likewise.
* elf32-h8300.c: Likewise.
* elf32-i370.c: Likewise.
* elf32-ip2k.c: Likewise.
* elf32-m68hc11.c: Likewise.
* elf32-mcore.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-v850.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-mips.c: Likewise.
* elf64-mmix.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-sparc.c: Likewise.
* elflink.c: Likewise.
* elflink.h: Likewise.
* elfn32-mips.c: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
(bfd *, void *, asymbol *);
/* This function, if defined, is called after all local symbols and
- global symbols converted to locals are emited into the symtab
+ global symbols converted to locals are emitted into the symtab
section. It allows the backend to emit special global symbols
not handled in the hash table. */
bfd_boolean (*elf_backend_output_arch_syms)
the generic code will warn that it is undefined.
This behavior is undesirable on HPs since the standard shared
- libraries contain reerences to undefined symbols.
+ libraries contain references to undefined symbols.
So we twiddle the flags associated with such symbols so that they
will not trigger the warning. ?!? FIXME. This is horribly fragile.
hppa_info->data_segment_base = (bfd_vma)-1;
/* HP's shared libraries have references to symbols that are not
- defined anywhere. The generic ELF BFD linker code will complaim
+ defined anywhere. The generic ELF BFD linker code will complain
about such symbols.
So we detect the losing case and arrange for the flags on the symbol
/* This function handles relaxing for the mn10200.
- There's quite a few relaxing opportunites available on the mn10200:
+ There are quite a few relaxing opportunities available on the mn10200:
* jsr:24 -> jsr:16 2 bytes
if (value & 0x8000)
continue;
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
case 0x40:
case 0x44:
case 0xc8:
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
&& (value & 0x8000) != 0)
continue;
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
to the target when it's valid and profitable to do so. */
unsigned char movm_args;
- /* For funtion symbols, the amount of stack space that would be allocated
+ /* For function symbols, the amount of stack space that would be allocated
by the movm instruction. This is redundant with movm_args, but we
add it to the hash table to avoid computing it over and over. */
unsigned char movm_stack_size;
byte_count += 4;
/* If using "call" will result in larger code, then turn all
- the associated "call" instructions into "calls" instrutions. */
+ the associated "call" instructions into "calls" instructions. */
if (byte_count < entry->direct_calls)
entry->flags |= MN10300_CONVERT_CALL_TO_CALLS;
/* This function handles relaxing for the mn10300.
- There's quite a few relaxing opportunites available on the mn10300:
+ There are quite a few relaxing opportunities available on the mn10300:
* calls:32 -> calls:16 2 bytes
* call:32 -> call:16 2 bytes
}
/* Now figure out how much stack space will be allocated by the movm
- instruction. We need this kept separate from the funtion's normal
+ instruction. We need this kept separate from the function's normal
stack space. */
if (hash->movm_args)
{
/* Return offset of the GOT id in PLT0 entry. */
#define elf_mn10300_plt0_gotid_offset(info) 9
-/* Return offset of the tempoline in PLT entry */
+/* Return offset of the temporary in PLT entry */
#define elf_mn10300_plt_temp_offset(info) 8
/* Return offset of the symbol in PLT entry. */
if (IS_SOLARIS_PT_INTERP (segment, section))
{
/* Mininal change so that the normal section to segment
- assigment code will work. */
+ assignment code will work. */
segment->p_vaddr = section->vma;
break;
}
/* The main hash table. */
struct elf_link_hash_table root;
- /* The size in bytes of the section containg the Thumb-to-ARM glue. */
+ /* The size in bytes of the section containing the Thumb-to-ARM glue. */
bfd_size_type thumb_glue_size;
- /* The size in bytes of the section containg the ARM-to-Thumb glue. */
+ /* The size in bytes of the section containing the ARM-to-Thumb glue. */
bfd_size_type arm_glue_size;
- /* An arbitary input BFD chosen to hold the glue sections. */
+ /* An arbitrary input BFD chosen to hold the glue sections. */
bfd * bfd_of_glue_owner;
/* A boolean indicating whether knowledge of the ARM's pipeline
instruction.
It takes two thumb instructions to encode the target address. Each has
- 11 bits to invest. The upper 11 bits are stored in one (identifed by
+ 11 bits to invest. The upper 11 bits are stored in one (identified by
H-0.. see below), the lower 11 bits are stored in the other (identified
by H-1).
switch (EF_ARM_EABI_VERSION (flags))
{
case EF_ARM_EABI_UNKNOWN:
- /* The following flag bits are GNU extenstions and not part of the
+ /* The following flag bits are GNU extensions and not part of the
official ARM ELF extended ABI. Hence they are only decoded if
the EABI version is not set. */
if (flags & EF_ARM_INTERWORK)
name = info->fini_function;
get_sym:
/* If it wasn't set by elf_bfd_final_link
- then there is nothing to ajdust. */
+ then there is nothing to adjust. */
if (dyn.d_un.d_val != 0)
{
struct elf_link_hash_entry * eh;
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Work out which section the relocation is targetted at and the
+ /* Work out which section the relocation is targeted at and the
initial relocation command value. */
/* Get symbol value. (Common symbols are special.) */
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Work out which section the relocation is targetted at and the
+ /* Work out which section the relocation is targeted at and the
initial relocation command value. */
/* Get symbol value. (Common symbols are special.) */
FALSE); /* pcrel_offset */
-/* The gas default beheaver is not to preform the %hi modifier so that the
+/* The gas default behavior is not to preform the %hi modifier so that the
GNU assembler can have the lower 16 bits offset placed in the insn, BUT
we do like the gas to indicate it is %hi reloc type so when we in the link
loader phase we can have the corrected hi16 vale replace the buggous lo16
More about this table - for dlx elf relocation we do not really
need this table, if we have a rtype defined in this table will
caused tc_gen_relocate confused and die on us, but if we remove
- this table it will caused more problem, so for now simple soulation
+ this table it will caused more problem, so for now simple solution
is to remove those entries which may cause problem. */
struct elf_reloc_map
{
/* This function handles relaxing for the H8..
- There's a few relaxing opportunites available on the H8:
+ There are a few relaxing opportunities available on the H8:
jmp/jsr:24 -> bra/bsr:8 2 bytes
The jmp may be completely eliminated if the previous insn is a
/* FALLTHRU */
/* This is a 24/32bit absolute address in a "mov" insn, which may
- become a 16bit absoulte address if it is in the right range. */
+ become a 16-bit absolute address if it is in the right range. */
case R_H8_DIR32A16:
{
bfd_vma value;
FIXME: We assume that there will never be relocations to
locations in linker-created sections that do not have
externally-visible names. Instead, we should work out precisely
- which sections relocations are targetted at. */
+ which sections relocations are targeted at. */
if (info->shared)
{
int c;
int switch_table_128;
int switch_table_256;
- /* Walk thru the section looking for relaxation opertunities. */
+ /* Walk thru the section looking for relaxation opportunities. */
for (irel = misc->irelbase; irel < irelend; irel++)
{
if (ELF32_R_TYPE (irel->r_info) != (int) R_IP2K_PAGE3)
case R_IP2K_ADDR16CJP:
if (BASEADDR (input_section) + rel->r_offset != page_addr + 2)
{
- /* No preceeding page instruction, verify that it isn't needed. */
+ /* No preceding page instruction, verify that it isn't needed. */
if (PAGENO (relocation + rel->r_addend) !=
ip2k_nominal_page_bits (input_bfd, input_section,
rel->r_offset, contents))
}
else if (ip2k_relaxed)
{
- /* Preceeding page instruction. Verify that the page instruction is
+ /* Preceding page instruction. Verify that the page instruction is
really needed. One reason for the relaxation to miss a page is if
the section is not marked as executable. */
if (!ip2k_is_switch_table_128 (input_bfd, input_section, rel->r_offset - 2, contents) &&
{
unsigned long old_sec_size = sec->_cooked_size;
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
free_relocs = NULL;
continue;
}
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
free_relocs = NULL;
if ((offset & 0xff80) == 0 || (offset & 0xff80) == 0xff80)
{
- /* Note that we've changed the reldection contents, etc. */
+ /* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
free_relocs = NULL;
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "ADDR32", /* name *//* For compatability with coff/pe port. */
+ "ADDR32", /* name *//* For compatibility with coff/pe port. */
FALSE, /* partial_inplace */
0x0, /* src_mask */
0xffffffff, /* dst_mask */
}
isym = isymbuf + ELF32_R_SYM (irel->r_info);
if (isym->st_shndx == SHN_UNDEF)
- continue; /* We can't do anthing with undefined symbols. */
+ continue; /* We can't do anything with undefined symbols. */
else if (isym->st_shndx == SHN_ABS)
tsec = bfd_abs_section_ptr;
else if (isym->st_shndx == SHN_COMMON)
branch_bit = BRANCH_PREDICT_BIT;
/* Fall thru */
- /* Branch not taken predicition relocations. */
+ /* Branch not taken prediction relocations. */
case R_PPC_ADDR14_BRNTAKEN:
case R_PPC_REL14_BRNTAKEN:
insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
Word 1 is a pointer to a structure describing the object
Word 2 is used to point to the loader entry address.
- The code for position independand PLT entries looks like this:
+ The code for position independent PLT entries looks like this:
r12 holds addr of the current GOT at entry to the PLT
TRUE), /* pcrel_offset */
/* The assembler will generate this reloc before a block of
- instructions. A section should be processed as assumining it
+ instructions. A section should be processed as assuming it
contains data, unless this reloc is seen. */
HOWTO (R_SH_CODE, /* type */
0, /* rightshift */
/* The addend will be against the section symbol, thus
for adjusting the addend, the relevant start is the
start of the section.
- N.B. If we want to abandom in-place changes here and
+ N.B. If we want to abandon in-place changes here and
test directly using symbol + addend, we have to take into
account that the addend has already been adjusted by -4. */
if (stop > addr && stop < toaddr)
#if 1
/* Note - this code has been "optimised" not to use r2. r2 is used by
- GCC to return the address of large strutcures, so it should not be
+ GCC to return the address of large structures, so it should not be
corrupted here. This does mean however, that this PLT does not conform
to the SH PIC ABI. That spec says that r0 contains the type of the PLT
and r2 contains the GOT id. This version stores the GOT id in r0 and
/* Return offset of the GOT id in PLT0 entry. */
#define elf_sh_plt0_gotid_offset(info) 24
-/* Return offset of the tempoline in PLT entry */
+/* Return offset of the temporary in PLT entry */
#define elf_sh_plt_temp_offset(info) 8
/* Return offset of the symbol in PLT entry. */
/* Extract the address. */
addr = match->address;
- /* Remeber if this entry has already been used before. */
+ /* Remember if this entry has already been used before. */
if (already_found)
* already_found = match->found;
}
/* FIXME: The code here probably ought to be removed and the code in reloc.c
- allowed to do its stuff instead. At least for most of the relocs, anwyay. */
+ allowed to do its stuff instead. At least for most of the relocs, anyway. */
static bfd_reloc_status_type
v850_elf_perform_relocation (abfd, r_type, addend, address)
if (reloc->address > isection->_cooked_size)
return bfd_reloc_outofrange;
- /* Work out which section the relocation is targetted at and the
+ /* Work out which section the relocation is targeted at and the
initial relocation command value. */
if (reloc->howto->pc_relative)
/ bfd_octets_per_byte (abfd)))
return bfd_reloc_outofrange;
- /* Work out which section the relocation is targetted at and the
+ /* Work out which section the relocation is targeted at and the
initial relocation command value. */
/* Get symbol value. (Common symbols are special.) */
expensive and unnecessary unless the target section is actually going
to be relaxed. This pass identifies all such sections by checking if
they have L32Rs pointing to them. In the process, the total number
- of relocations targetting each section is also counted so that we
+ of relocations targeting each section is also counted so that we
know how much space to allocate for source_relocs against each
relaxable literal section. */
if (this_got == NULL)
continue;
- /* We are assuming no merging has yet ocurred. */
+ /* We are assuming no merging has yet occurred. */
BFD_ASSERT (this_got == i);
if (alpha_elf_tdata (this_got)->total_got_size > MAX_GOT_SIZE)
return FALSE;
}
-/* Mark all funtions exported by this file so that we can later allocate
+/* Mark all functions exported by this file so that we can later allocate
entries in .opd for them. */
static bfd_boolean
}
/* Create function descriptor section (.opd). This section is called .opd
- because it contains "official prodecure descriptors". The "official"
+ because it contains "official procedure descriptors". The "official"
refers to the fact that these descriptors are used when taking the address
of a procedure, thus ensuring a unique address for each procedure. */
bfd_put_64 (sdlt->owner, value, sdlt->contents + dyn_h->dlt_offset);
}
- /* Create a relocation for the DLT entry assocated with this symbol.
+ /* Create a relocation for the DLT entry associated with this symbol.
When building a shared library the symbol does not have to be dynamic. */
if (dyn_h->want_dlt
&& (elf64_hppa_dynamic_symbol_p (dyn_h->h, info) || info->shared))
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 64 bit substraction. */
+ /* 64 bit subtraction. */
HOWTO (R_MIPS_SUB, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 64 bit substraction. */
+ /* 64 bit subtraction. */
HOWTO (R_MIPS_SUB, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Work out which section the relocation is targetted at and the
+ /* Work out which section the relocation is targeted at and the
initial relocation command value. */
/* Get symbol value. (Common symbols are special.) */
pointers must reference the descriptor. Thus, a function pointer
initialized to the address of a function in a shared library will
either require a copy reloc, or a dynamic reloc. Using a copy reloc
- redefines the function desctriptor symbol to point to the copy. This
+ redefines the function descriptor symbol to point to the copy. This
presents a problem as a plt entry for that function is also
initialized from the function descriptor symbol and the copy reloc
may not be initialized first. */
return TRUE;
}
-/* This function takes care of emiting STT_REGISTER symbols
+/* This function takes care of emitting STT_REGISTER symbols
which we cannot easily keep in the symbol hash table. */
static bfd_boolean
else
olddef = TRUE;
- /* We need to rememeber if a symbol has a definition in a dynamic
+ /* We need to remember if a symbol has a definition in a dynamic
object or is weak in all dynamic objects. Internal and hidden
visibility will make it unavailable to dynamic objects. */
if (newdyn && (h->elf_link_hash_flags & ELF_LINK_DYNAMIC_DEF) == 0)
return TRUE;
}
- /* We need to treat weak definiton right, depending on if there is a
+ /* We need to treat weak definition right, depending on if there is a
definition from a dynamic object. */
if (bind == STB_WEAK)
{
h->size, abfd, bfd_link_hash_common, sym->st_size)))
return FALSE;
- /* If the predumed common symbol in the dynamic object is
+ /* If the presumed common symbol in the dynamic object is
larger, pretend that the new symbol has its size. */
if (h->size > *pvalue)
if (override)
{
- /* We are overridden by an old defition. We need to check if we
+ /* We are overridden by an old definition. We need to check if we
need to create the indirect symbol from the default name. */
hi = elf_link_hash_lookup (elf_hash_table (info), name, TRUE,
FALSE, FALSE);
{
/* Here SHORTNAME is a versioned name, so we don't expect to see
the type of override we do in the case above unless it is
- overridden by a versioned definiton. */
+ overridden by a versioned definition. */
if (hi->root.type != bfd_link_hash_defined
&& hi->root.type != bfd_link_hash_defweak)
(*_bfd_error_handler)
{
/* This should be impossible, since ELF requires that all
global symbols follow all local symbols, and that sh_info
- point to the first global symbol. Unfortunatealy, Irix 5
+ point to the first global symbol. Unfortunately, Irix 5
screws this up. */
continue;
}
int new_flag;
/* Check the alignment when a common symbol is involved. This
- can change when a common symbol is overriden by a normal
+ can change when a common symbol is overridden by a normal
definition or a common symbol is ignored due to the old
normal definition. We need to make sure the maximum
alignment is maintained. */
# if 1
/* Variant 1: optimize for short chains. We add the squares
- of all the chain lengths (which favous many small chain
+ of all the chain lengths (which favors many small chain
over a few long chains). */
for (j = 0; j < i; ++j)
max += counts[j] * counts[j];
return FALSE;
}
- /* Make all global versions with definiton. */
+ /* Make all global versions with definition. */
for (t = verdefs; t != NULL; t = t->next)
for (d = t->globals.list; d != NULL; d = d->next)
if (!d->symver && d->symbol)
if (!info->allow_undefined_version)
{
- /* Check if all global versions have a definiton. */
+ /* Check if all global versions have a definition. */
all_defined = TRUE;
for (t = verdefs; t != NULL; t = t->next)
for (d = t->globals.list; d != NULL; d = d->next)
return TRUE;
}
-/* Propogate collected vtable information. This is called through
+/* Propagate collected vtable information. This is called through
elf_link_hash_traverse. */
static bfd_boolean
return TRUE;
}
\f
-/* Called from check_relocs to record the existance of a VTINHERIT reloc. */
+/* Called from check_relocs to record the existence of a VTINHERIT reloc. */
bfd_boolean
elf_gc_record_vtinherit (bfd *abfd,
return TRUE;
}
-/* Called from check_relocs to record the existance of a VTENTRY reloc. */
+/* Called from check_relocs to record the existence of a VTENTRY reloc. */
bfd_boolean
elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 64 bit substraction. */
+ /* 64 bit subtraction. */
HOWTO (R_MIPS_SUB, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
descriptor for a MIN_PLT entry, and requires one IPLT reloc.
MIN_PLT Created by PLTOFF entries against dynamic symbols. This
- does not reqire dynamic relocations. */
+ does not require dynamic relocations. */
#define NELEMS(a) ((int) (sizeof (a) / sizeof ((a)[0])))
bfd_vma dtpmod_offset;
bfd_vma dtprel_offset;
- /* The symbol table entry, if any, that this was derrived from. */
+ /* The symbol table entry, if any, that this was derived from. */
struct elf_link_hash_entry *h;
/* Used to count non-got, non-plt relocations for delayed sizing
isym = isymbuf + ELFNN_R_SYM (irel->r_info);
if (isym->st_shndx == SHN_UNDEF)
- continue; /* We can't do anthing with undefined symbols. */
+ continue; /* We can't do anything with undefined symbols. */
else if (isym->st_shndx == SHN_ABS)
tsec = bfd_abs_section_ptr;
else if (isym->st_shndx == SHN_COMMON)
else
{
- /* We can't do anthing with undefined symbols. */
+ /* We can't do anything with undefined symbols. */
if (h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak)
continue;
}
/* Create function descriptor section (.opd). This section is called .opd
- because it contains "official prodecure descriptors". The "official"
+ because it contains "official procedure descriptors". The "official"
refers to the fact that these descriptors are used when taking the address
of a procedure, thus ensuring a unique address for each procedure. */
first available global GOT entry in G. VALUE must contain the size
of a GOT entry in bytes. For each global GOT entry that requires a
dynamic relocation, NEEDED_RELOCS is incremented, and the symbol is
- marked as not elligible for lazy resolution through a function
+ marked as not eligible for lazy resolution through a function
stub. */
static int
mips_elf_set_global_got_offset (entryp, p)
}
/* Return non-zero if the indicated VALUE has overflowed the maximum
- range expressable by a signed number with the indicated number of
+ range expressible by a signed number with the indicated number of
BITS. */
static bfd_boolean