New 64-bit PowerPC toolchain/GLIBC code drop
Alan Modra
amodra@bigpond.net.au
Tue May 21 16:51:00 GMT 2002
On Wed, May 22, 2002 at 09:04:38AM +0930, Alan Modra wrote:
> Just the information that readelf -s libdl.so bombs is enough in this
> case. My build of libdl.so is similarly corrupted.
Uh, oh, my build logs show:
/usr/local/lib/gcc-lib/powerpc64-linux/3.1/../../../../powerpc64-linux/bin/ld: /src/tmp/build/glibc64/dlfcn/libdl_pic.a(eval.os)(.opd+0x0): unresolvable relocation against symbol `.__strtol_internal@@GLIBC_2.2.5'
And ld is returning a zero exit status. :-(
This patch fixes the exit status problem, and also stops a segfault
that can occur when mixing 32 and 64 bit objects.
* elf64-ppc.c (ppc64_elf_relocate_section): Return false for
unresolved relocs.
(ppc64_elf_size_dynamic_sections): Check for splt NULL.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.41
diff -u -p -r1.41 elf64-ppc.c
--- bfd/elf64-ppc.c 20 May 2002 13:12:41 -0000 1.41
+++ bfd/elf64-ppc.c 21 May 2002 23:48:34 -0000
@@ -3897,7 +3897,7 @@ ppc64_elf_size_dynamic_sections (output_
return false;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt != NULL && htab->splt->_raw_size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -5716,12 +5716,15 @@ ppc64_elf_relocate_section (output_bfd,
&& !(info->shared
&& (input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- (*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset,
- h->root.root.string);
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset,
+ h->root.root.string);
+ ret = false;
+ }
r = _bfd_final_link_relocate (ppc64_elf_howto_table[(int) r_type],
input_bfd,
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list