This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix s390{,x} ld if there is just .rela.plt and not other .rela.* sections
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 7 Feb 2003 23:12:18 +0100
- Subject: [PATCH] Fix s390{,x} ld if there is just .rela.plt and not other .rela.* sections
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
As s390 (32-bit only) is in glibc terms ELF_MACHINE_PLTREL_OVERLAP
architecture, DT_RELA{,SZ,ENT} dynamic tags are needed even if there is just
.rela.plt and no other .rela sections. Not doing this leads to dynamic
linker crashes.
Ok to commit?
2003-02-07 Jakub Jelinek <jakub@redhat.com>
* elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
even if there is just non-empty .rela.plt.
--- bfd/elf32-s390.c.jj 2003-01-24 18:15:38.000000000 -0500
+++ bfd/elf32-s390.c 2003-02-07 16:48:18.000000000 -0500
@@ -1,5 +1,5 @@
/* IBM S/390-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
This file is part of BFD, the Binary File Descriptor library.
@@ -2014,7 +2014,7 @@ elf_s390_size_dynamic_sections (output_b
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->_raw_size != 0)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
Jakub