aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 7ec06c7..9a05c38 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -10,7 +10,7 @@
Largely rewritten by Alan Modra <alan@linuxcare.com.au>
Naming cleanup by Carlos O'Donell <carlos@systemhalted.org>
TLS support written by Randolph Chung <tausq@debian.org>
-
+
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -124,20 +124,20 @@
Structure/Variable Prefix
elf_link_hash_table "etab"
elf_link_hash_entry "eh"
-
+
elf32_hppa_link_hash_table "htab"
elf32_hppa_link_hash_entry "hh"
bfd_hash_table "btab"
bfd_hash_entry "bh"
-
+
bfd_hash_table containing stubs "bstab"
elf32_hppa_stub_hash_entry "hsh"
elf32_hppa_dyn_reloc_entry "hdh"
-
+
Always remember to use GNU Coding Style. */
-
+
#define PLT_ENTRY_SIZE 8
#define GOT_ENTRY_SIZE 4
#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
@@ -1110,7 +1110,7 @@ hppa32_elf_local_refcounts (bfd *abfd)
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_refcounts;
-
+
local_refcounts = elf_local_got_refcounts (abfd);
if (local_refcounts == NULL)
{
@@ -1378,7 +1378,7 @@ elf32_hppa_check_relocs (bfd *abfd,
else
{
bfd_signed_vma *local_got_refcounts;
-
+
/* This is a global offset table entry for a local symbol. */
local_got_refcounts = hppa32_elf_local_refcounts (abfd);
if (local_got_refcounts == NULL)
@@ -1965,7 +1965,7 @@ allocate_plt_static (struct elf_link_hash_entry *eh, void *inf)
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. */
-
+
hh->plabel = 0;
}
else if (hh->plabel)
@@ -2013,7 +2013,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
return FALSE;
hh = hppa_elf_hash_entry (eh);
-
+
if (htab->etab.dynamic_sections_created
&& eh->plt.offset != (bfd_vma) -1
&& !hh->plabel
@@ -2114,7 +2114,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
/* For the non-shared case, discard space for relocs against
symbols which turn out to need copy relocs or are not
dynamic. */
-
+
if (!eh->non_got_ref
&& ((ELIMINATE_COPY_RELOCS
&& eh->def_dynamic
@@ -2301,7 +2301,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
sec->size += 2 * GOT_ENTRY_SIZE;
else if ((*local_tls_type & GOT_TLS_GD) == GOT_TLS_GD)
sec->size += GOT_ENTRY_SIZE;
- if (info->shared)
+ if (info->shared)
{
srel->size += sizeof (Elf32_External_Rela);
if ((*local_tls_type & (GOT_TLS_GD | GOT_TLS_IE)) == (GOT_TLS_GD | GOT_TLS_IE))
@@ -2342,10 +2342,10 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
}
}
-
+
if (htab->tls_ldm_got.refcount > 0)
{
- /* Allocate 2 got entries and 1 dynamic reloc for
+ /* Allocate 2 got entries and 1 dynamic reloc for
R_PARISC_TLS_DTPMOD32 relocs. */
htab->tls_ldm_got.offset = htab->sgot->size;
htab->sgot->size += (GOT_ENTRY_SIZE * 2);
@@ -3220,7 +3220,7 @@ elf32_hppa_build_stubs (struct bfd_link_info *info)
}
/* Return the base vma address which should be subtracted from the real
- address when resolving a dtpoff relocation.
+ address when resolving a dtpoff relocation.
This is PT_TLS segment p_vaddr. */
static bfd_vma
@@ -3242,9 +3242,9 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
/* If tls_sec is NULL, we should have signalled an error already. */
if (htab->tls_sec == NULL)
return 0;
- /* hppa TLS ABI is variant I and static TLS block start just after
+ /* hppa TLS ABI is variant I and static TLS block start just after
tcbhead structure which has 2 pointer fields. */
- return (address - htab->tls_sec->vma
+ return (address - htab->tls_sec->vma
+ align_power ((bfd_vma) 8, htab->tls_sec->alignment_power));
}
@@ -3323,7 +3323,7 @@ final_link_relocate (asection *input_section,
bfd_signed_vma addend = rela->r_addend;
bfd_vma location;
struct elf32_hppa_stub_hash_entry *hsh = NULL;
- int val;
+ int val;
if (r_type == R_PARISC_NONE)
return bfd_reloc_ok;
@@ -4002,7 +4002,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|| outrel.r_offset == (bfd_vma) -2);
outrel.r_offset += (input_section->output_offset
+ input_section->output_section->vma);
-
+
if (skip)
{
memset (&outrel, 0, sizeof (outrel));
@@ -4064,12 +4064,12 @@ elf32_hppa_relocate_section (bfd *output_bfd,
bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
}
break;
-
+
case R_PARISC_TLS_LDM21L:
case R_PARISC_TLS_LDM14R:
{
bfd_vma off;
-
+
off = htab->tls_ldm_got.offset;
if (off & 1)
off &= ~1;
@@ -4078,12 +4078,12 @@ elf32_hppa_relocate_section (bfd *output_bfd,
Elf_Internal_Rela outrel;
bfd_byte *loc;
- outrel.r_offset = (off
+ outrel.r_offset = (off
+ htab->sgot->output_section->vma
+ htab->sgot->output_offset);
outrel.r_addend = 0;
outrel.r_info = ELF32_R_INFO (0, R_PARISC_TLS_DTPMOD32);
- loc = htab->srelgot->contents;
+ loc = htab->srelgot->contents;
loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
@@ -4155,7 +4155,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|| hh->eh.root.type != bfd_link_hash_undefweak))
{
need_relocs = TRUE;
- loc = htab->srelgot->contents;
+ loc = htab->srelgot->contents;
/* FIXME (CAO): Should this be reloc_count++ ? */
loc += htab->srelgot->reloc_count * sizeof (Elf32_External_Rela);
}