This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: strip 2.11.90.0.25 dumps core
- To: Artur Frysiak <wiget at pld dot org dot pl>
- Subject: Re: strip 2.11.90.0.25 dumps core
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Thu, 2 Aug 2001 10:09:41 -0700
- Cc: binutils at sourceware dot cygnus dot com, amodra at bigpond dot net dot au
- References: <20010731141628.I30121@free.buy.pl> <20010731083312.A10404@lucon.org> <20010801154411.D12322@free.buy.pl> <20010801083023.A32569@lucon.org> <20010801181946.A7168@ikar.t17.ds.pwr.wroc.pl> <20010801092817.A1059@lucon.org> <20010802111445.A29935@ikar.t17.ds.pwr.wroc.pl>
On Thu, Aug 02, 2001 at 11:14:46AM +0200, Artur Frysiak wrote:
> On Wed, Aug 01, 2001 at 09:28:17AM -0700, H . J . Lu wrote:
> >
> > Please send me all the binary files used to generate `rpm'.
> > I need
> >
> > rpm.o
> > libdb1.a
> > libz.a
> > libbz2.a
> > ./build/.libs/librpmbuild.a
> > ./lib/.libs/librpm.a
> > /usr/lib/libdb-3.1.a
> > ./rpmio/.libs/librpmio.a
> > ./popt/.libs/libpopt.a
>
> Files attached.
>
> > Something it wrong with your setup.
>
Please try this patch and relink rpm. Alan, why don't we discard all
relocations for static binaries? If it is the right thing to do, you
may want to check other ELF targets.
Thanks.
H.J.
----
2001-08-02 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (allocate_plt_and_got_and_discard_relocs):
Discard all relocations if there are no dynamic sections.
Index: elf32-i386.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elf32-i386.c,v
retrieving revision 1.31
diff -u -p -r1.31 elf32-i386.c
--- elf32-i386.c 2001/06/29 18:25:45 1.31
+++ elf32-i386.c 2001/08/02 17:03:13
@@ -1197,6 +1197,7 @@ allocate_plt_and_got_and_discard_relocs
return true;
if (!info->shared
+ && htab->root.dynamic_sections_created
&& (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
|| h->root.type == bfd_link_hash_undefweak