aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-03-06 11:32:43 +0000
committerAlan Modra <amodra@gmail.com>2003-03-06 11:32:43 +0000
commit7b609f53e8d85a4bac227532eee48ccdb3469c57 (patch)
treea0cc2cb1d405273a7b9dee52fab5042be1ab8082 /bfd/elf64-ppc.c
parent6b3824459235e138a34a685d16be678ce510ce10 (diff)
downloadgdb-7b609f53e8d85a4bac227532eee48ccdb3469c57.zip
gdb-7b609f53e8d85a4bac227532eee48ccdb3469c57.tar.gz
gdb-7b609f53e8d85a4bac227532eee48ccdb3469c57.tar.bz2
* elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
error messages. (ELIMINATE_COPY_RELOCS): Define to zero. (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating TLSLD relocs. Report reloc types on a number of errors. Optimize LOCAL24PC check for non-local syms. Don't capitalize error messages. * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero. (ppc64_elf_relocate_section): Don't deref htab->tls_sec when calculating TLSLD relocs. Report reloc types on a number of errors. Don't capitalize error messages.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 23d95d5..5963e97 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2545,7 +2545,7 @@ struct plt_entry
copying dynamic variables from a shared lib into an app's dynbss
section, and instead use a dynamic relocation to point into the
shared lib. */
-#define ELIMINATE_COPY_RELOCS 1
+#define ELIMINATE_COPY_RELOCS 0
/* Section name for stubs is the associated section name plus this
string. */
@@ -7670,21 +7670,22 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
relocation += rel->r_addend;
- if (tls_type != 0)
+ if (tls_type == (TLS_TLS | TLS_LD))
+ relocation = 1;
+ else if (tls_type != 0)
{
relocation -= htab->tls_sec->vma + DTP_OFFSET;
- if ((tls_type & TLS_TPREL) != 0)
+ if (tls_type == (TLS_TLS | TLS_TPREL))
relocation += DTP_OFFSET - TP_OFFSET;
- }
- if ((tls_type & TLS_GD) != 0)
- {
- bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off + 8);
- relocation = 1;
+ if (tls_type == (TLS_TLS | TLS_GD))
+ {
+ bfd_put_64 (output_bfd, relocation,
+ htab->sgot->contents + off + 8);
+ relocation = 1;
+ }
}
- else if (tls_type == (TLS_TLS | TLS_LD))
- relocation = 1;
+
bfd_put_64 (output_bfd, relocation,
htab->sgot->contents + off);
}
@@ -7981,7 +7982,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* These ones haven't been implemented yet. */
(*_bfd_error_handler)
- (_("%s: Relocation %s is not supported for symbol %s."),
+ (_("%s: relocation %s is not supported for symbol %s."),
bfd_archive_filename (input_bfd),
ppc64_elf_howto_table[(int) r_type]->name, sym_name);
@@ -8095,10 +8096,11 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
+ (_("%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, input_section),
(long) rel->r_offset,
+ ppc64_elf_howto_table[(int) r_type]->name,
h->root.root.string);
ret = FALSE;
}
@@ -8140,10 +8142,13 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
+ (_("%s(%s+0x%lx): %s reloc against `%s': error %d"),
bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset, sym_name, (int) r);
+ (long) rel->r_offset,
+ ppc64_elf_howto_table[(int) r_type]->name,
+ sym_name,
+ (int) r);
ret = FALSE;
}
}