.init/.text/.fini vs. .text/.init/.fini
Ian Lance Taylor
ian@zembu.com
Thu Apr 13 17:34:00 GMT 2000
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
More information about the Binutils
mailing list