[Bug binutils/9811] export table broken after forward (dlltool)

2009-02-13 Thread dannysmith at users dot sourceforge dot net

--- Additional Comments From dannysmith at users dot sourceforge dot net  
2009-02-13 08:11 ---
Created an attachment (id=3734)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3734&action=view)
Patch to defparse.y

Patch

-- 


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

--- 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 binutils/9811] export table broken after forward (dlltool)

2009-02-13 Thread dannysmith at users dot sourceforge dot net

--- Additional Comments From dannysmith at users dot sourceforge dot net  
2009-02-13 08:13 ---
(In reply to comment #3)
> Created an attachment (id=3734)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3734&action=view)
> Patch to defparse.y
> 
> Patch

And ChangeLog entry
2009-02-13  Danny Smith  

* defparse.y (opt_equal_name): Handle "module.ext.internal_name"
syntax.


-- 


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

--- 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/9841] New: avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread darius at dons dot net dot au
The following causes ld to seg fault..
avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  -Wa,-
avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  -Wa,-
avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  -Wa,-
avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  -Wa,-
avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  -Wl,-u,vfprintf
-lprintf_min -Wl,-relax -Wl,-Map=sprink.map,--cref  -g sprink.o cons.o ds1307.o
1wire.o -o sprink.elf

If I select an atmega16 or atmega32 it doesn't crash, if I don't use -relax it
also doesn't crash.

Reproducable in Windows (WinAVR), FreeBSD 6.2 and Ubuntu 8.10.

-- 
   Summary: avr-ld crashes when -relax is used with ATMega8535
target
   Product: binutils
   Version: 2.18
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: darius at dons dot net dot au
CC: bug-binutils at gnu dot org,eweddington at cso dot atmel
dot com
  GCC host triplet: x86_64-portbld-freebsd6.2


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread darius at dons dot net dot au

--- Additional Comments From darius at dons dot net dot au  2009-02-14 
02:34 ---
Created an attachment (id=3735)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3735&action=view)
Project that causes the crash

Unpack and run BSD make (ie pmake in Linux, make in FreeBSD), see ld crash.


-- 


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread darius at dons dot net dot au

--- Additional Comments From darius at dons dot net dot au  2009-02-14 
03:35 ---
I added -Wl,--debug-relax per Eric's suggestion and get the following..

avr-gcc -O -DF_CPU=800 -Os -Wall -gdwarf-2 -mmcu=atmega8535  
-Wl,-u,vfprintf 
-lprintf_min -Wl,-relax -Wl,--debug-relax -Wl,-Map=sprink.map,--cref  -g
sprink.o cons.o ds1307.o 1wire.o -o sprink.elf
converted rcall/ret sequence at address 0x9c2 into rjmp/ret sequence. Section is
.text

converted rcall/ret sequence at address 0x1254 into rjmp/ret sequence. Section
is .text

found rjmp / ret sequence at address 0x9c2
avr-gcc: Internal error: Segmentation fault (program ld)
Please submit a full bug report.
See  for instructions.
*** Error code 1

Stop.


-- 


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread pwilson at scopuli dot com

--- Additional Comments From pwilson at scopuli dot com  2009-02-14 03:54 
---
Created an attachment (id=3736)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3736&action=view)
Output of --debug-relax option using WinAVR 20081205

Output from:
avr-gcc -O2 -fno-strict-aliasing -pipe  -DF_CPU=800 -Os -Wall -gdwarf-2
-mmcu=atmega8535  -Wl,-u,vfprintf -lprintf_min -Wl,-relax -Wl,--debug-relax
-Wl,-Map=sprink.map,--cref  -g sprink.o cons.o

avr-gcc --version
avr-gcc (WinAVR 20081205) 4.3.2

avr-ld --version
GNU ld (WinAVR 20081205) 2.19


-- 


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread j at uriah dot heep dot sax dot de

--- Additional Comments From j at uriah dot heep dot sax dot de  2009-02-14 
07:42 ---
The location of the crash is:

Program received signal SIGSEGV, Segmentation fault.
0x080985f0 in elf32_avr_relax_section (abfd=0x821e600, sec=0x826d014,
link_info=0x810ba40, 
again=0xbfbfe318) at elf32-avr.c:2042
2042   if (isym->st_value == 
section_offset_of_ret_insn

(The line number still refers to binutils 2.18.)

isym is a NULL pointer here.  The lines around it look like:

2037/* Check for local symbols.  */
2038isym = (Elf_Internal_Sym *) 
symtab_hdr->contents;
2039isymend = isym + symtab_hdr->sh_info;
2040for (; isym < isymend; isym++)
2041 {
2042   if (isym->st_value == 
section_offset_of_ret_insn
2043   && isym->st_shndx == sec_shndx)
2044 {
2045   deleting_ret_is_safe = 0;
2046   if (debug_relax)

and it's in fact already symtab_hdr->contents that is NULL.
symtab_hdr->sh_info is 24 though.  Here's the entire symtab_hdr
entry:

(gdb) p *symtab_hdr
$4 = {sh_name = 1, sh_type = 2, sh_flags = 0, sh_addr = 0, sh_size = 576,
sh_entsize = 16, 
  sh_link = 21, sh_info = 24, sh_offset = 4188, sh_addralign = 4, bfd_section =
0x0, contents = 0x0}
(gdb) p/x *symtab_hdr
$5 = {sh_name = 0x1, sh_type = 0x2, sh_flags = 0x0, sh_addr = 0x0, sh_size =
0x240, sh_entsize = 0x10, 
  sh_link = 0x15, sh_info = 0x18, sh_offset = 0x105c, sh_addralign = 0x4,
bfd_section = 0x0, 
  contents = 0x0}


-- 
   What|Removed |Added

 CC||bjoern dot m dot haase at
   ||web dot de


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread pwilson at scopuli dot com

--- Additional Comments From pwilson at scopuli dot com  2009-02-14 07:45 
---
Created an attachment (id=3737)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3737&action=view)
stack trace of ld core dump

In case this is helpful ...

I built gcc 4.3.2 and binutils 2.19 with the patches from WinAVR 20081215 on an
Ubuntu 8.10 system.  The attached file shows the stack trace and a little other
data from ld when it crashed.


-- 


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

--- 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/9841] avr-ld crashes when -relax is used with ATMega8535 target

2009-02-13 Thread j at uriah dot heep dot sax dot de


-- 
   What|Removed |Added

 CC||j at uriah dot heep dot sax
   ||dot de


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

--- 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