This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
.init .text .fini
- From: Shaun Jackman <sjackman at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 4 May 2005 21:33:35 -0700
- Subject: .init .text .fini
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
Hello,
Why do the symbols _init and _fini sit in their own segments .init and
.fini rather than in .text? I'm trying to generate a binary suitable
for a flash image in an embedded system where the start symbol is at
the first address, but with the default linker script -- armelf.xc in
my case -- _init from .init is being placed before _mainCRTStartup
from .text.
Could the default order in ld/scripttempl/elf.sc be changed to .text
.init .fini rather than the current .init .text .fini, or would this
break something? Even better, could _init and _fini be placed in
.text?
Thanks,
Shaun