bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

segfault in ld-2.11


From: Neil F. Moore
Subject: segfault in ld-2.11
Date: Wed, 18 Apr 2001 13:34:37 -0400

When attempting to compile SDL, I get an error from gcc that ld has
died.  Running ld by hand, I get the following:


~$ ld -shared  SDL.lo SDL_error.lo SDL_fatal.lo SDL_getenv.lo --whole-archive 
main/.libs/libarch.al audio/.libs/libaudio.al video/.libs/libvideo.al 
events/.libs/libevents.al joystick/.libs/libjoystick.al cdrom/.libs/libcdrom.al 
thread/.libs/libthread.al timer/.libs/libtimer.al endian/.libs/libendian.al 
file/.libs/libfile.al hermes/.libs/libhermes.al --no-whole-archive  -lm 
-L/opt/kde/lib -ldl -lartsc -L/opt/gnome/lib -lesd -L/usr/lib -laudiofile -lm 
-laudio -lXt -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga -ldl -lc  
-soname libSDL-1.2.so.0 -o .libs/libSDL-1.2.so.0.0.0
Segmentation fault


GDB says:

(gdb) run
Starting program: /usr/bin/ld -shared  SDL.lo SDL_error.lo SDL_fatal.lo 
SDL_getenv.lo --whole-archive main/.libs/libarch.al audio/.libs/libaudio.al 
video/.libs/libvideo.al events/.libs/libevents.al joystick/.libs/libjoystick.al 
cdrom/.libs/libcdrom.al thread/.libs/libthread.al timer/.libs/libtimer.al 
endian/.libs/libendian.al file/.libs/libfile.al hermes/.libs/libhermes.al 
--no-whole-archive  -lm -L/opt/kde/lib -ldl -lartsc -L/opt/gnome/lib -lesd 
-L/usr/lib -laudiofile -lm -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm 
-lXxf86dga -ldl -lc  -soname libSDL-1.2.so.0 -o .libs/libSDL-1.2.so.0.0.0

Program received signal SIGSEGV, Segmentation fault.
0x8075e96 in elf_link_input_bfd (finfo=0xbffff254, input_bfd=0x825f730)
    at elflink.h:5540
5540                isec->symbol->value = isym->st_value;
(gdb) bt
#0  0x8075e96 in elf_link_input_bfd (finfo=0xbffff254, input_bfd=0x825f730)
    at elflink.h:5540
#1  0x807487a in bfd_elf32_bfd_final_link (abfd=0x80cfda0, info=0x80c8a00)
    at elflink.h:4569
#2  0x80774d9 in _bfd_elf32_gc_common_final_link (abfd=0x80cfda0, 
    info=0x80c8a00) at elflink.h:6899
#3  0x8058e4d in ldwrite () at ldwrite.c:536
#4  0x805655e in main (argc=41, argv=0xbffff37c) at ./ldmain.c:372
(gdb) q


Inspecting isec, isec->symbol, and isym by hand, I can't see anything
wrong (i.e., they don't point off to nowhere); I'm assuming, then,
that something has been freed multiple times.


~$ ld --version
GNU ld 2.11
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   elf_i386
   i386linux



-- 
Neil Moore, address@hidden, address@hidden, http://tarski.2y.net/~neil/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]