This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/63223] [avr] Make jumptables work with -Wl,--section-start,.text=
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Oct 2014 09:31:51 +0000
- Subject: [Bug target/63223] [avr] Make jumptables work with -Wl,--section-start,.text=
- Auto-submitted: auto-generated
- References: <bug-63223-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63223
--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jorn Wolfgang Rennecke from comment #4)
> (In reply to Georg-Johann Lay from comment #1)
> do_global_dtors is supposed to start at the start and increment from there.
> I see it used to be half-way wrong and half-way correct.
> (Starting at the start, decrementing for __AVR_HAVE_ELPM__, incrementing
> otherwise.)
> However, you now made it all the way use an incorrect order - starting at the
> end and incrementing from there.
> Is there a rationale for this?
The old code was broken as it decremented begainning at the start address. The
flaw never came apparent for __dtors_start = __dtors_end or with simulators
that terminated in exit.
The new code uses the same traverse direction like __do_global_ctors.
Is the order of .ctors, .dtors defined in any way? I.e. how do you express
that constructor A must run before constructor B in the C program? Same for
destructors.