aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-alpha.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2010-09-24 12:14:26 +0000
committerThomas Schwinge <tschwinge@gnu.org>2010-09-24 12:14:26 +0000
commitcf35638d431e230d51d54550e8a249e730264ea5 (patch)
treeeed3fbc4ab7982aac3fe5f38bb85e16bc80410d3 /bfd/elf64-alpha.c
parent2c2fa401c554831bacec9c920678ddda8ce69519 (diff)
downloadgdb-cf35638d431e230d51d54550e8a249e730264ea5.zip
gdb-cf35638d431e230d51d54550e8a249e730264ea5.tar.gz
gdb-cf35638d431e230d51d54550e8a249e730264ea5.tar.bz2
2010-09-24 Thomas Schwinge <thomas@codesourcery.com>
* elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c, elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c, elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h, elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to the zero symbol index.
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r--bfd/elf64-alpha.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 19326cf..1df020c 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1866,8 +1866,8 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_ALPHA_TLSLDM:
/* The symbol for a TLSLDM reloc is ignored. Collapse the
- reloc to the 0 symbol so that they all match. */
- r_symndx = 0;
+ reloc to the STN_UNDEF (0) symbol so that they all match. */
+ r_symndx = STN_UNDEF;
h = 0;
maybe_dynamic = FALSE;
/* FALLTHRU */
@@ -3491,7 +3491,7 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval,
as appropriate. */
use_gottprel = FALSE;
- new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : 0;
+ new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : STN_UNDEF;
/* Beware of the compiler hoisting part of the sequence out a loop
and adjusting the destination register for the TLSGD insn. If this
@@ -3724,8 +3724,8 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec,
case R_ALPHA_TLSLDM:
/* The symbol for a TLSLDM reloc is ignored. Collapse the
- reloc to the 0 symbol so that they all match. */
- r_symndx = 0;
+ reloc to the STN_UNDEF (0) symbol so that they all match. */
+ r_symndx = STN_UNDEF;
break;
default:
@@ -4154,9 +4154,9 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
r_symndx = ELF64_R_SYM(rel->r_info);
/* The symbol for a TLSLDM reloc is ignored. Collapse the
- reloc to the 0 symbol so that they all match. */
+ reloc to the STN_UNDEF (0) symbol so that they all match. */
if (r_type == R_ALPHA_TLSLDM)
- r_symndx = 0;
+ r_symndx = STN_UNDEF;
if (r_symndx < symtab_hdr->sh_info)
{
@@ -4166,10 +4166,10 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
msec = sec;
value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
- /* If this is a tp-relative relocation against sym 0,
+ /* If this is a tp-relative relocation against sym STN_UNDEF (0),
this is hackery from relax_section. Force the value to
be the tls module base. */
- if (r_symndx == 0
+ if (r_symndx == STN_UNDEF
&& (r_type == R_ALPHA_TLSLDM
|| r_type == R_ALPHA_GOTTPREL
|| r_type == R_ALPHA_TPREL64
@@ -4455,7 +4455,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
dynaddend = value - dtp_base;
}
else if (info->shared
- && r_symndx != 0
+ && r_symndx != STN_UNDEF
&& (input_section->flags & SEC_ALLOC)
&& !undef_weak_ref)
{
@@ -4503,7 +4503,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* ??? .eh_frame references to discarded sections will be smashed
to relocations against SHN_UNDEF. The .eh_frame format allows
NULL to be encoded as 0 in any format, so this works here. */
- if (r_symndx == 0)
+ if (r_symndx == STN_UNDEF)
howto = (elf64_alpha_howto_table
+ (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG));
goto default_reloc;