[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in avr-ld when using templates and generating a map file
From: |
Nick Clifton |
Subject: |
Re: Bug in avr-ld when using templates and generating a map file |
Date: |
Wed, 21 Jul 2004 16:14:28 +0100 |
User-agent: |
Mozilla Thunderbird 0.7 (X11/20040615) |
Hi Lars,
but crashes avr-ld when a link map is requested.
avr-gcc -mmcu=atmega128 -Wl,-Map,uart2.map uart2.cc -o uart2.bin
So it does. How annoying. It turns out to be an uninitialised memory
bug and the following patch should fix it. Let me know if you have any
problems with it. Meanwhile I am going to check it into the mainline
sources.
Cheers
Nick
ld/ChangeLog
2004-07-21 Nick Clifton <address@hidden>
* ldlang.c (init_os): Make sure that the newly allocated
userdata structure is zeroed out.
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.157
diff -c -3 -p -r1.157 ldlang.c
*** ld/ldlang.c 19 Jul 2004 16:40:51 -0000 1.157
--- ld/ldlang.c 21 Jul 2004 15:01:49 -0000
*************** init_os (lang_output_section_statement_t
*** 807,812 ****
--- 807,813 ----
einfo (_("%P%F: Illegal use of `%s' section\n"),
DISCARD_SECTION_NAME);
new = stat_alloc (SECTION_USERDATA_SIZE);
+ memset (new, 0, SECTION_USERDATA_SIZE);
s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
if (s->bfd_section == NULL)