Question about _init, _fini
mikeci at acm.org
mikeci at acm.org
Thu Aug 21 21:00:00 UTC 2003
> Quite likely yes. Look for the .init and .fini sections of a linker
> script for another bsp using a processor similar to yours- if you're
> using a MIPS, have a look at the MongooseV's link script, you'll find it
> down in the bsp directory. WHile you're at it, you might want to check
> the other sections too, linker scripts evolve and sometimes
> leave bsp's behind.
>
> Gregm
Hi!
Here is what I tried:
1. Add a new section:
.init :
{
KEEP (*(.init))
}
and similar for .fini
This gives me a linker error stating that _init and _fini are undefined.
If I add
.init :
{
PROVIDE (_init = .);
KEEP(*(.init))
}
linker doesn't complain, but program generates an exception. My question
is where are those two symbols defined, and how to link the code which
goes with it?
If I check the memory map, it seams that no code is linked neither for
_init nor for _fini.
Regards
Ivica
More information about the users
mailing list