[Top][All Lists]

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

[Bug binutils/3874] New: linker crashes with -m avr2 --oformat ihex

From: jw at suse dot de
Subject: [Bug binutils/3874] New: linker crashes with -m avr2 --oformat ihex
Date: 15 Jan 2007 22:16:17 -0000

Using any simple test program, do this on a 32bit host (64bit hosts tend not to 
crash reliably here)

$ avr-gcc -mmcu=attiny2313 avr_test.c -c
$ avr-ld -m avr2 -o avr_test.hex /opt/cross/avr/lib/crttn2313.o --oformat ihex 
BFD 20061201 internal error, aborting at ../../bfd/linker.c line 
2397 in set_symbol_from_hash

I tracked that back to one specific patch added in August 2006:
cvs -d :pserver:address@hidden:/cvs/src co -D '2006-10-17 15:41' 
- is good
cvs -d :pserver:address@hidden:/cvs/src co -D '2006-10-17 15:42' 
- crashes.

The Changelog of the patch has this:
diff -u -r1.3635 -r1.3636
--- bfd/ChangeLog       16 Oct 2006 17:21:44 -0000      1.3635
+++ bfd/ChangeLog       17 Oct 2006 13:41:46 -0000      1.3636
@@ -1,3 +1,55 @@
+2006-10-17  Alan Modra  <address@hidden>
+       * elf-bfd.h (struct elf_link_hash_table): Reorder.  Add
+       text_index_section and data_index_section.
+       (struct elf_backend_data): Add elf_backend_init_index_section.
+       (_bfd_elf_init_1_index_section): Declare.
+       (_bfd_elf_init_2_index_sections): Declare.
+       * elfxx-target.h (elf_backend_init_index_section): Define.
+       (elfNN_bed): Init new field.
+       * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
+       section and text_index_section plus data_index_section.
+       (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
+       (_bfd_elf_init_1_index_section): New function.
+       (_bfd_elf_init_2_index_sections): New function.
+       (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
+       (elf_link_input_bfd): When emitting relocs, use text_index_section
+       and data_index_section for removed sections.
+       * elf-m10300.c (elf_backend_omit_section_dynsym): Define.
+       * elf32-i386.c: Likewise.
+       * elf32-m32r.c: Likewise.
+       * elf32-sh.c: Likewise.
elf32-avr.c is not in the list. Can someone please help extending this patch 
to cover also avr targets?


           Summary: linker crashes with -m avr2 --oformat ihex
           Product: binutils
           Version: 2.18 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: jw at suse dot de
                CC: amodra at bigpond dot net dot au,bug-binutils at gnu dot
GCC target triplet: cross-avr-binutils


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

reply via email to

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