aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-09-16 14:52:12 +0000
committerAlan Modra <amodra@gmail.com>2004-09-16 14:52:12 +0000
commitf5385ebfb8e4e9e336adba121a22d110488303d1 (patch)
tree9e0255b2253d334ed022b14e44bf44c23f909e22 /bfd/elf32-vax.c
parentb6ee372a3e4a3c008d6576e6b5ab51f1cf01bed4 (diff)
downloadgdb-f5385ebfb8e4e9e336adba121a22d110488303d1.zip
gdb-f5385ebfb8e4e9e336adba121a22d110488303d1.tar.gz
gdb-f5385ebfb8e4e9e336adba121a22d110488303d1.tar.bz2
* elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
with bitfields. Make "type" and "other" bitfields too. (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR, ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC, ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED, ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF, ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK, ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK, ELF_LINK_POINTER_EQUALITY_NEEDED): Delete. (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update. * elf-hppa.h: Update all uses of elf_link_hash_flags. * elf-m10300.c: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-vax.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92. * configure: Regenerate. * aclocal.m4: Regenerate.
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c55
1 files changed, 23 insertions, 32 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index a0249b1..6cf279e 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -682,7 +682,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
if (h == NULL)
continue;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
if (h->plt.refcount == -1)
h->plt.refcount = 1;
else
@@ -706,8 +706,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (!info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
if (h != NULL)
{
@@ -962,24 +961,21 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ && (h->needs_plt
|| h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+ || (h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular)));
/* 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. */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
+ && !h->def_dynamic
+ && !h->ref_dynamic
/* We must always create the plt entry if it was referenced
by a PLTxxO relocation. In this case we already recorded
it as a dynamic symbol. */
@@ -990,7 +986,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
object. In such a case, we don't actually need to build
a procedure linkage table, and we can just do a PCxx
reloc instead. */
- BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+ BFD_ASSERT (h->needs_plt);
h->plt.offset = (bfd_vma) -1;
return TRUE;
}
@@ -998,7 +994,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* GC may have rendered this entry unused. */
if (h->plt.refcount <= 0)
{
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
h->plt.offset = (bfd_vma) -1;
return TRUE;
}
@@ -1026,7 +1022,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
pointers compare as equal between the normal executable and
the shared library. */
if (!info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = s->size;
@@ -1103,7 +1099,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
srel->size += sizeof (Elf32_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1349,7 +1345,7 @@ elf_vax_discard_copies (h, ignore)
h = (struct elf_vax_link_hash_entry *) h->root.root.u.i.link;
/* We only discard relocs for symbols defined in a regular object. */
- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->root.def_regular)
return TRUE;
for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
@@ -1504,12 +1500,10 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
&& elf_hash_table (info)->dynamic_sections_created
&& (! info->shared
|| (! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
|| (info->shared
&& ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ || !h->def_regular)
&& ((input_section->flags & SEC_ALLOC) != 0
/* DWARF will emit R_VAX_32 relocations in its
sections against symbols defined externally
@@ -1517,8 +1511,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
with them here. */
|| ((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
&& (r_type == R_VAX_8
|| r_type == R_VAX_16
|| r_type == R_VAX_32
@@ -1558,7 +1551,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared
&& h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && h->def_regular)
{
/* The symbol was forced to be local
because of a version file.. We must initialize
@@ -1665,8 +1658,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
&& r_type != R_VAX_PC16
&& r_type != R_VAX_PC32)
|| (!info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@@ -1714,8 +1706,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
become local. */
else if (h != NULL
&& ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
{
BFD_ASSERT (h->dynindx != -1);
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@@ -1923,7 +1914,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = srela->contents + plt_index * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
@@ -1954,7 +1945,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
the relocate_section function. */
if (info->shared
&& h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && h->def_regular)
{
rela.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE);
}
@@ -1971,7 +1962,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
asection *s;
Elf_Internal_Rela rela;