[Bug ld/5761] New: Segfault in make_abs().

2008-02-13 Thread osv at javad dot com
This segfault occurs with both 2.18 and 2.18.50.20080213, while 2.17 works fine.
Here is gdb stack backtrace:

(gdb) run
Starting program: /home/osv/try/sparc-elf/bin/ld -o main -L../linker
-L/home/osv/firm/build/leon3/ecos/install/lib
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/v8
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/../../../../sparc-elf/lib/v8
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/../../../../sparc-elf/lib -Map main.map
-s -S --gc-sections -N -T std_avt.lnk  --start-group -ltarget -lc
-lm -lsupc++ --end-group -lgcc -lgcc -v
GNU ld (GNU Binutils) 2.18.50.20080213

Program received signal SIGSEGV, Segmentation fault.
make_abs () at ../../../binutils/ld/ldexp.c:138
138   expld.result.value += expld.result.section->vma;
(gdb) bt
#0  make_abs () at ../../../binutils/ld/ldexp.c:138
#1  0x08055b6f in lang_size_sections_1 (s=,
output_section_statement=0x919c578, prev=0x1, fill=0x0, dot=1611642024,
relax=0x0, check_regions=0) at ../../../binutils/ld/ldlang.c:4821
#2  0x0805644f in one_lang_size_sections_pass (relax=0x0, check_regions=0) at
../../../binutils/ld/ldlang.c:4970
#3  0x080566c9 in strip_excluded_output_sections () at
../../../binutils/ld/ldlang.c:3499
#4  0x080653ab in gldelf32_sparc_before_allocation () at eelf32_sparc.c:1038
#5  0x08058ad0 in lang_process () at ../../../binutils/ld/ldlang.c:6062
#6  0x0805cbd5 in main (argc=152751196, argv=0xc4) at
../../../binutils/ld/ldmain.c:461
(gdb) p expld.result.section
$1 = (asection *) 0x0
(gdb)

Unfortunately I can't send all the object files to reproduce this, but hopefully
I can aid in debugging, -- please let me know what can I do to help.

-- 
   Summary: Segfault in make_abs().
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: osv at javad dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sparc-unknown-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=5761

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5763] New: Segfault in make_abs().

2008-02-14 Thread osv at javad dot com
This segfault occurs with both 2.18 and 2.18.50.20080213, while 2.17 works fine.
Here is gdb stack backtrace:

(gdb) run
Starting program: /home/osv/try/sparc-elf/bin/ld -o main -L../linker
-L/home/osv/firm/build/leon3/ecos/install/lib
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/v8
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/../../../../sparc-elf/lib/v8
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3
-L/home/osv/try/lib/gcc/sparc-elf/4.2.3/../../../../sparc-elf/lib -Map main.map
-s -S --gc-sections -N -T std_avt.lnk  --start-group -ltarget -lc
-lm -lsupc++ --end-group -lgcc -lgcc -v
GNU ld (GNU Binutils) 2.18.50.20080213

Program received signal SIGSEGV, Segmentation fault.
make_abs () at ../../../binutils/ld/ldexp.c:138
138   expld.result.value += expld.result.section->vma;
(gdb) bt
#0  make_abs () at ../../../binutils/ld/ldexp.c:138
#1  0x08055b6f in lang_size_sections_1 (s=,
output_section_statement=0x919c578, prev=0x1, fill=0x0, dot=1611642024,
relax=0x0, check_regions=0) at ../../../binutils/ld/ldlang.c:4821
#2  0x0805644f in one_lang_size_sections_pass (relax=0x0, check_regions=0) at
../../../binutils/ld/ldlang.c:4970
#3  0x080566c9 in strip_excluded_output_sections () at
../../../binutils/ld/ldlang.c:3499
#4  0x080653ab in gldelf32_sparc_before_allocation () at eelf32_sparc.c:1038
#5  0x08058ad0 in lang_process () at ../../../binutils/ld/ldlang.c:6062
#6  0x0805cbd5 in main (argc=152751196, argv=0xc4) at
../../../binutils/ld/ldmain.c:461
(gdb) p expld.result.section
$1 = (asection *) 0x0
(gdb)

Unfortunately I can't send all the object files to reproduce this, but hopefully
I can aid in debugging, -- please let me know what can I do to help.

-- 
   Summary: Segfault in make_abs().
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: osv at javad dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sparc-unknown-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=5763

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5761] Segfault in make_abs().

2008-02-14 Thread osv at javad dot com

--- Additional Comments From osv at javad dot com  2008-02-14 12:32 ---
*** Bug 5763 has been marked as a duplicate of this bug. ***

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5761

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5763] Segfault in make_abs().

2008-02-14 Thread osv at javad dot com

--- Additional Comments From osv at javad dot com  2008-02-14 12:32 ---
Sorry, -- this one has been created by mistake.

*** This bug has been marked as a duplicate of 5761 ***

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=5763

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5761] Segfault in make_abs().

2008-02-14 Thread osv at javad dot com

--- Additional Comments From osv at javad dot com  2008-02-14 12:33 ---
Hi Nick,

I'll try to reproduce the bug in a cut-down test case. Please let me know if you
have some guess of what can cause such a problem, maybe /DISCARD/ or (NOLOAD)
sections?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5761

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5761] Segfault in make_abs().

2008-02-15 Thread osv at javad dot com

--- Additional Comments From osv at javad dot com  2008-02-15 12:01 ---
Fortunately the problem has nothing to do with object files. It's the linker
command file that does matter, so here is a simple way to reproduce the 
segfault:

$ cat linker.cmd
MEMORY
{
  RAM : ORIGIN = 0,   LENGTH = 0x1
  ROM : ORIGIN = 0x1, LENGTH = 0x1
}

SECTIONS
{
  .data : AT(__data_image) {
*(.data*)
  } > RAM
  __rom_data_start = LOADADDR(.data);

  .data_image (NOLOAD): {
__data_image = .;
. += SIZEOF(.data);
  } > RAM
}
$ echo -n "" | ~/try/bin/sparc-elf-as -o test.o && \
> ~/try/bin/sparc-elf-ld -v -T linker.cmd test.o
GNU ld (GNU Binutils) 2.18.50.20080213
Segmentation fault (core dumped)
$


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5761

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5785] New: Spurious "section xxx overlaps section yyy"

2008-02-21 Thread osv at javad dot com
LD version 2.18.x produces bogus "section .xxx overlaps section .bss", while LD
version 2.16.1 works just fine. Here is cut-down test to reproduce the problem:

$ echo -n | ~/try/bin/sparc-elf-as -o test.o
$ ~/try/bin/sparc-elf-ld -v -o test -T test.lnk test.o
GNU ld (GNU Binutils) 2.18.50.20080218
/home/osv/try/bin/sparc-elf-ld: section .xxx [0110 -> 011f] overlaps
section .bss [0110 -> 022f]
$ cat test.lnk
MEMORY
{
  ROM: ORIGIN = 0,  LENGTH = 0x1000
  RAM: ORIGIN = 0x4000, LENGTH = 0x1000
}

SECTIONS
{
  .data : AT(__data_image) {
. += 0x110;
  } > RAM

  .bss : {
. += 0x120;
  } > RAM

  .data_image (NOLOAD): {
__data_image = .;
. += SIZEOF(.data);
  } > ROM

  .xxx : {
. += 0x10;
  } > ROM

  .text : { *(.text) } > ROM
}
$

-- 
   Summary: Spurious "section xxx overlaps section yyy"
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: osv at javad dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sparc-unknown-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=5785

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils