[Bug 1103437] [NEW] ld segfaults in libbfd-2.22-system.so

Diego Argueta 1103437 at bugs.launchpad.net
Wed Jan 23 11:54:39 UTC 2013


Public bug reported:

I've been working on my own operating system for a while, took a long
break of several months, then when I tried compiling it ld started
segfaulting without me having changed much of any code nor the build
script. I've attached the core dump in case it's helpful.

According to gdb the offending function appears to be _bfd_generic_link_add_archive_symbols in libbfd-2.22-system.so.
binutils is version 2.22-6ubuntu1 on 64-bit Ubuntu 12.04 LTS.

Command line:
ld -e kmain -s -mi386linux --fatal-warnings -nostdlib --oformat binary -T linkopts -o ./bin/os.bin $OBJLIST ./obj/cstdlib.a

$OBJLIST is a list of files put together earlier in the script. The
linkopts file, in its entirety, is:

SECTIONS
{
        .text 0x100000 : { }
        .data : { }
        .bss : { }
}

Judging from the function name I'm guessing it's blowing up when I add
cstdlib.a, but I can't test it to be sure because it complains about
missing symbols when I take out any of the object files. The archiving
command I use is:

ar rcs ./obj/cstdlib.a $(find ./obj/code/cstdlib -name '*.o')

** Affects: binutils (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Core dump when ld crashed"
   https://bugs.launchpad.net/bugs/1103437/+attachment/3496386/+files/core-ld-11-1000-1000-21333-1358919461

** Description changed:

  I've been working on my own operating system for a while, took a long
  break of several months, then when I tried compiling it ld started
  segfaulting without me having changed much of any code nor the build
  script. I've attached the core dump in case it's helpful.
  
  According to gdb the offending function appears to be _bfd_generic_link_add_archive_symbols in libbfd-2.22-system.so.
  binutils is version 2.22-6ubuntu1 on 64-bit Ubuntu 12.04 LTS.
+ 
+ Command line:
+ ld -e kmain -s -mi386linux --fatal-warnings -nostdlib --oformat binary -T linkopts -o ./bin/os.bin $OBJLIST ./obj/cstdlib.a
+ 
+ $OBJLIST is a list of files put together earlier in the script. The
+ linkopts file, in its entirety, is:
+ 
+ SECTIONS
+ {
+         .text 0x100000 : { }
+         .data : { }
+         .bss : { }
+ }

** Description changed:

  I've been working on my own operating system for a while, took a long
  break of several months, then when I tried compiling it ld started
  segfaulting without me having changed much of any code nor the build
  script. I've attached the core dump in case it's helpful.
  
  According to gdb the offending function appears to be _bfd_generic_link_add_archive_symbols in libbfd-2.22-system.so.
  binutils is version 2.22-6ubuntu1 on 64-bit Ubuntu 12.04 LTS.
  
  Command line:
  ld -e kmain -s -mi386linux --fatal-warnings -nostdlib --oformat binary -T linkopts -o ./bin/os.bin $OBJLIST ./obj/cstdlib.a
  
  $OBJLIST is a list of files put together earlier in the script. The
  linkopts file, in its entirety, is:
  
  SECTIONS
  {
-         .text 0x100000 : { }
-         .data : { }
-         .bss : { }
+         .text 0x100000 : { }
+         .data : { }
+         .bss : { }
  }
+ 
+ Judging from the function name I'm guessing it's blowing up when I add
+ cstdlib.a, but I can't test it to be sure because it complains about
+ missing symbols when I take out any of the object files. The archiving
+ command I use is:
+ 
+ ar rcs ./obj/cstdlib.a $(find ./obj/code/cstdlib -name '*.o')

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/1103437

Title:
  ld segfaults in libbfd-2.22-system.so

Status in “binutils” package in Ubuntu:
  New

Bug description:
  I've been working on my own operating system for a while, took a long
  break of several months, then when I tried compiling it ld started
  segfaulting without me having changed much of any code nor the build
  script. I've attached the core dump in case it's helpful.

  According to gdb the offending function appears to be _bfd_generic_link_add_archive_symbols in libbfd-2.22-system.so.
  binutils is version 2.22-6ubuntu1 on 64-bit Ubuntu 12.04 LTS.

  Command line:
  ld -e kmain -s -mi386linux --fatal-warnings -nostdlib --oformat binary -T linkopts -o ./bin/os.bin $OBJLIST ./obj/cstdlib.a

  $OBJLIST is a list of files put together earlier in the script. The
  linkopts file, in its entirety, is:

  SECTIONS
  {
          .text 0x100000 : { }
          .data : { }
          .bss : { }
  }

  Judging from the function name I'm guessing it's blowing up when I add
  cstdlib.a, but I can't test it to be sure because it complains about
  missing symbols when I take out any of the object files. The archiving
  command I use is:

  ar rcs ./obj/cstdlib.a $(find ./obj/code/cstdlib -name '*.o')

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1103437/+subscriptions




More information about the foundations-bugs mailing list