mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
* 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.
This commit is contained in:
@ -1,3 +1,16 @@
|
|||||||
|
2003-03-06 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2003-03-03 H.J. Lu <hjl@gnu.org>
|
2003-03-03 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* elfxx-ia64.c (USE_BRL): Removed.
|
* elfxx-ia64.c (USE_BRL): Removed.
|
||||||
|
@ -2300,7 +2300,7 @@ ppc_elf_create_linker_section (abfd, info, which)
|
|||||||
switch (which)
|
switch (which)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
(*_bfd_error_handler) (_("%s: Unknown special linker type %d"),
|
(*_bfd_error_handler) (_("%s: unknown special linker type %d"),
|
||||||
bfd_get_filename (abfd),
|
bfd_get_filename (abfd),
|
||||||
(int) which);
|
(int) which);
|
||||||
|
|
||||||
@ -2455,7 +2455,7 @@ ppc_elf_create_dynamic_sections (abfd, info)
|
|||||||
copying dynamic variables from a shared lib into an app's dynbss
|
copying dynamic variables from a shared lib into an app's dynbss
|
||||||
section, and instead use a dynamic relocation to point into the
|
section, and instead use a dynamic relocation to point into the
|
||||||
shared lib. */
|
shared lib. */
|
||||||
#define ELIMINATE_COPY_RELOCS 1
|
#define ELIMINATE_COPY_RELOCS 0
|
||||||
|
|
||||||
/* Adjust a symbol defined by a dynamic object and referenced by a
|
/* Adjust a symbol defined by a dynamic object and referenced by a
|
||||||
regular object. The current definition is in some section of the
|
regular object. The current definition is in some section of the
|
||||||
@ -4824,13 +4824,13 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
{
|
{
|
||||||
bfd_vma value = relocation;
|
bfd_vma value = relocation;
|
||||||
|
|
||||||
if ((tls_ty & (TLS_GD | TLS_TPREL | TLS_DTPREL
|
if (tls_ty == (TLS_TLS | TLS_LD))
|
||||||
| TLS_TPRELGD)) != 0)
|
value = 1;
|
||||||
|
else if (tls_ty != 0)
|
||||||
{
|
{
|
||||||
value -= htab->tls_sec->vma + DTP_OFFSET;
|
value -= htab->tls_sec->vma + DTP_OFFSET;
|
||||||
if ((tls_ty & TLS_TPREL) != 0)
|
if (tls_ty == (TLS_TLS | TLS_TPREL))
|
||||||
value += DTP_OFFSET - TP_OFFSET;
|
value += DTP_OFFSET - TP_OFFSET;
|
||||||
}
|
|
||||||
|
|
||||||
if (tls_ty == (TLS_TLS | TLS_GD))
|
if (tls_ty == (TLS_TLS | TLS_GD))
|
||||||
{
|
{
|
||||||
@ -4838,8 +4838,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
htab->got->contents + off + 4);
|
htab->got->contents + off + 4);
|
||||||
value = 1;
|
value = 1;
|
||||||
}
|
}
|
||||||
else if (tls_ty == (TLS_TLS | TLS_LD))
|
}
|
||||||
value = 1;
|
|
||||||
bfd_put_32 (output_bfd, value,
|
bfd_put_32 (output_bfd, value,
|
||||||
htab->got->contents + off);
|
htab->got->contents + off);
|
||||||
}
|
}
|
||||||
@ -4887,10 +4886,11 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
got at entry m+n bears little relation to the entry m. */
|
got at entry m+n bears little relation to the entry m. */
|
||||||
if (addend != 0)
|
if (addend != 0)
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%s(%s+0x%lx): non-zero addend on got reloc against `%s'"),
|
(_("%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
bfd_get_section_name (input_bfd, input_section),
|
||||||
(long) rel->r_offset,
|
(long) rel->r_offset,
|
||||||
|
howto->name,
|
||||||
sym_name);
|
sym_name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -4899,10 +4899,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
case R_PPC_LOCAL24PC:
|
case R_PPC_LOCAL24PC:
|
||||||
/* It makes no sense to point a local relocation
|
/* It makes no sense to point a local relocation
|
||||||
at a symbol not in this object. */
|
at a symbol not in this object. */
|
||||||
if (h != NULL
|
if (unresolved_reloc)
|
||||||
&& (h->root.type == bfd_link_hash_defined
|
|
||||||
|| h->root.type == bfd_link_hash_defweak)
|
|
||||||
&& sec->output_section == NULL)
|
|
||||||
{
|
{
|
||||||
if (! (*info->callbacks->undefined_symbol) (info,
|
if (! (*info->callbacks->undefined_symbol) (info,
|
||||||
h->root.root.string,
|
h->root.root.string,
|
||||||
@ -5037,8 +5034,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
|
|
||||||
if (skip)
|
if (skip)
|
||||||
memset (&outrel, 0, sizeof outrel);
|
memset (&outrel, 0, sizeof outrel);
|
||||||
/* h->dynindx may be -1 if this symbol was marked to
|
|
||||||
become local. */
|
|
||||||
else if (h != NULL
|
else if (h != NULL
|
||||||
&& !SYMBOL_REFERENCES_LOCAL (info, h))
|
&& !SYMBOL_REFERENCES_LOCAL (info, h))
|
||||||
{
|
{
|
||||||
@ -5175,7 +5170,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
|| (strncmp (name, ".sbss", 5) == 0
|
|| (strncmp (name, ".sbss", 5) == 0
|
||||||
&& (name[5] == 0 || name[5] == '.'))))
|
&& (name[5] == 0 || name[5] == '.'))))
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
|
(*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
sym_name,
|
sym_name,
|
||||||
howto->name,
|
howto->name,
|
||||||
@ -5199,7 +5194,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
if (! (strncmp (name, ".sdata2", 7) == 0
|
if (! (strncmp (name, ".sdata2", 7) == 0
|
||||||
|| strncmp (name, ".sbss2", 6) == 0))
|
|| strncmp (name, ".sbss2", 6) == 0))
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
|
(*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
sym_name,
|
sym_name,
|
||||||
howto->name,
|
howto->name,
|
||||||
@ -5256,7 +5251,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
|
(*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
sym_name,
|
sym_name,
|
||||||
howto->name,
|
howto->name,
|
||||||
@ -5310,7 +5305,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
case R_PPC_EMB_RELST_HA:
|
case R_PPC_EMB_RELST_HA:
|
||||||
case R_PPC_EMB_BIT_FLD:
|
case R_PPC_EMB_BIT_FLD:
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%s: Relocation %s is not yet supported for symbol %s."),
|
(_("%s: relocation %s is not yet supported for symbol %s."),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
howto->name,
|
howto->name,
|
||||||
sym_name);
|
sym_name);
|
||||||
@ -5363,10 +5358,11 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
|
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_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_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
bfd_get_section_name (input_bfd, input_section),
|
||||||
(long) rel->r_offset,
|
(long) rel->r_offset,
|
||||||
|
howto->name,
|
||||||
sym_name);
|
sym_name);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
@ -5412,10 +5408,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_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_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
bfd_get_section_name (input_bfd, input_section),
|
||||||
(long) rel->r_offset, sym_name, (int) r);
|
(long) rel->r_offset, howto->name, sym_name, (int) r);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2545,7 +2545,7 @@ struct plt_entry
|
|||||||
copying dynamic variables from a shared lib into an app's dynbss
|
copying dynamic variables from a shared lib into an app's dynbss
|
||||||
section, and instead use a dynamic relocation to point into the
|
section, and instead use a dynamic relocation to point into the
|
||||||
shared lib. */
|
shared lib. */
|
||||||
#define ELIMINATE_COPY_RELOCS 1
|
#define ELIMINATE_COPY_RELOCS 0
|
||||||
|
|
||||||
/* Section name for stubs is the associated section name plus this
|
/* Section name for stubs is the associated section name plus this
|
||||||
string. */
|
string. */
|
||||||
@ -7670,21 +7670,22 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
relocation += rel->r_addend;
|
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;
|
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;
|
relocation += DTP_OFFSET - TP_OFFSET;
|
||||||
}
|
|
||||||
|
|
||||||
if ((tls_type & TLS_GD) != 0)
|
if (tls_type == (TLS_TLS | TLS_GD))
|
||||||
{
|
{
|
||||||
bfd_put_64 (output_bfd, relocation,
|
bfd_put_64 (output_bfd, relocation,
|
||||||
htab->sgot->contents + off + 8);
|
htab->sgot->contents + off + 8);
|
||||||
relocation = 1;
|
relocation = 1;
|
||||||
}
|
}
|
||||||
else if (tls_type == (TLS_TLS | TLS_LD))
|
}
|
||||||
relocation = 1;
|
|
||||||
bfd_put_64 (output_bfd, relocation,
|
bfd_put_64 (output_bfd, relocation,
|
||||||
htab->sgot->contents + off);
|
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. */
|
/* These ones haven't been implemented yet. */
|
||||||
|
|
||||||
(*_bfd_error_handler)
|
(*_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),
|
bfd_archive_filename (input_bfd),
|
||||||
ppc64_elf_howto_table[(int) r_type]->name, sym_name);
|
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))
|
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_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_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
bfd_get_section_name (input_bfd, input_section),
|
||||||
(long) rel->r_offset,
|
(long) rel->r_offset,
|
||||||
|
ppc64_elf_howto_table[(int) r_type]->name,
|
||||||
h->root.root.string);
|
h->root.root.string);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
@ -8140,10 +8142,13 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_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_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
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;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user