This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29141] static constructors beyond 64k fail
- From: "joerg dot diederich at graffiti dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2006 13:36:59 -0000
- Subject: [Bug c++/29141] static constructors beyond 64k fail
- References: <bug-29141-13275@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from joerg dot diederich at graffiti dot net 2006-09-19 13:36 -------
thanks to joerg wunsch, additional information is already available.
#ifdef L_ctors
.section .init6,"ax",@progbits
.global __do_global_ctors
__do_global_ctors:
ldi r17, hi8(__ctors_start)
ldi r28, lo8(__ctors_end)
ldi r29, hi8(__ctors_end)
rjmp .do_global_ctors_start
.do_global_ctors_loop:
sbiw r28, 2
mov_h r31, r29
mov_l r30, r28
XCALL __tablejump__
.do_global_ctors_start:
cpi r28, lo8(__ctors_start)
cpc r29, r17
brne .do_global_ctors_loop
#endif /* L_ctors */
using r28/r29 only works for data <64k. r30/r31 are filled with wrong data in
return, in detail 64k less than intended.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29141