This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld segfault while compiling Linux/alpha 2.6 with CVS trunk


On Thu, Sep 18, 2003 at 01:16:28PM -0400, Daniel Jacobowitz wrote:
> On Wed, Sep 10, 2003 at 08:09:30PM +0100, James Troup wrote:
> > Hi,
> > 
> > As reported in http://bugs.debian.org/204615/, ld segfaults while
> > trying to link a Linux 2.6.0-test<n> kernel for Alpha.  I've
> > reproduced this segfault with binutils CVS trunk (as of tonight
> > (2003-09-10)).  Backtrace is below.  The files mentioned in the
> > command line are available from:
> > 
> > http://people.debian.org/~troup/binutils/files.tar.gz
> > 
> > -- 
> > James
> > 
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > 
> > Starting program: /home/troup/binutils/src/ld/ld-new -static -N  -T arch/alpha/kernel/vmlinux.lds.s arch/alpha/kernel/head.o   init/built-in.o --start-group  usr/built-in.o  arch/alpha/kernel/built-in.o  arch/alpha/mm/built-in.o  arch/alpha/math-emu/built-in.o  kernel/built-in.o  mm/built-in.o  fs/built-in.o  ipc/built-in.o  security/built-in.o  crypto/built-in.o  lib/lib.a  arch/alpha/lib/lib.a  lib/built-in.o  arch/alpha/lib/built-in.o  drivers/built-in.o  sound/built-in.o  net/built-in.o --end-group  -o .tmp_vmlinux1
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > elf64_alpha_calc_got_offsets_for_symbol (h=0x120616258, arg=0x0) at elf64-alpha.c:3620
> > 3620            *plge += alpha_got_entry_size (gotent->reloc_type);
> > (gdb) bt
> > #0  elf64_alpha_calc_got_offsets_for_symbol (h=0x120616258, arg=0x0) at elf64-alpha.c:3620
> 
> 
> Some details:
> 
> The GOT entry is created with gotobj of net/built-in.o.  But the symbol
> is defined in mm/built-in.o.  So when we walk the list of global
> symbols in net/built-in.o in elf64_alpha_merge_gots, we don't find it.
> 
> We then merge net/built-in.o's .got into head.o's, but this gotent
> still has gotobj pointing at net/build-in.o.
> 
> I can't see how this is supposed to work for any global symbol defined
> and referenced in separate objects :(  Oh, probably it does if we merge
> the objects which reference and define.

I think I was barking up the wrong tree.  net/built-in.o has a 0-size
.got section.  Removing it lets the link succeed.

Is the bug likely to be:
  - the creation of the .got section in the object?
  - the linker crash?
  - both?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]