Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27492 - segfault in bfd_elf32_bfd_link_add_symbols in binutils 2.14.*
Summary: segfault in bfd_elf32_bfd_link_add_symbols in binutils 2.14.*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-28 12:25 UTC by Adam Chodorowski
Modified: 2003-09-01 12:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Chodorowski 2003-08-28 12:25:47 UTC
There is a bug in binutils 2.14.* which causes a segfault in certain
circumstances when linking. This bug does not exist in binutils 2.11.*. It has
already been reported to bugs-binutils, and there is a fix in binutils CVS.

More details on the bug can be found here:
+ http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00559.html
+ http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00735.html

It would be nice if binutils 2.14.* could be patched locally in the ebuild
before an upstream version with this bugfix appears. Patch follows:

Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.239
diff -u -p -r1.239 elflink.h
--- bfd/elflink.h	20 Aug 2003 08:37:19 -0000	1.239
+++ bfd/elflink.h	23 Aug 2003 04:02:17 -0000
@@ -1186,7 +1186,8 @@ elf_link_add_object_symbols (bfd *abfd, 
 	      bfd *common_bfd;
 
 	      symbol_align = ffs (h->root.u.def.value) - 1;
-	      if ((h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+	      if (h->root.u.def.section->owner != NULL
+		  && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
 		{
 		  normal_align = h->root.u.def.section->alignment_power;
 		  if (normal_align > symbol_align)


Reproducible: Always
Steps to Reproduce:




Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-gentoo-r6 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="http://gentoo.linux.no/pub/gentoo/
http://trumpetti.atm.tut.fi/gentoo/ http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow avi cups encode foomaticdb gif jpeg libg++ mad mmx mpeg
ncurses nls pdflib png quicktime truetype xml2 xv zlib gdbm berkdb slang
readline tetex tcltk mysql postgres X sdl tcpd pam libwww python esd imlib
oggvorbis opengl cdr apache2 gtk gtk2 pda mikmod mozilla crypt ssl -doc -xmms
-java -perl -gnome -gnome2 -gpm -lame -perl -svga -arts -kde -motif -qt -aalib
-alsa -apm -spell -xface"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon -O3 -fomit-frame-pointer -pipe"
CXXFLAGS="-march=athlon -O3 -fomit-frame-pointer -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-01 12:24:55 UTC
Added, thanks.