This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: .init/.text/.fini vs. .text/.init/.fini
- To: geoffk at cygnus dot com
- Subject: Re: .init/.text/.fini vs. .text/.init/.fini
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 13 Apr 2000 17:33:48 -0700
- CC: binutils at sourceware dot cygnus dot com
- References: <200004132345.QAA13204@localhost.cygnus.com>
Date: Thu, 13 Apr 2000 16:45:33 -0700
From: Geoff Keating <geoffk@cygnus.com>
If the .init section is before .text, then when users write
(say) -Ttext=0x70000000, they discover to their surprise that
-Ttext simply doesn't work very well with ELF. Nor do -Tdata and
-Tbss, for that matter. Those options are really only useful with
a.out or some such system. Your patch makes a few more things work,
but it doesn't fix the general problem.
If you have some specific important case which is solved by this
patch, then it may be OK. It's hard to be certain, since some code
may currently rely on putting their start address in the .init
section. If you are trying to fix something you happened across, then
I would prefer that people simply use a linker script.
Ian