_PRESTART (.init) section - who created this and why?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

_PRESTART (.init) section - who created this and why?

Jump to solution
726 Views
leesp
Contributor I

Hi,

I am a newbie using CW for MC9S08. I noticed that there is a section _PRESTART (or .init) section which is created by the Linker automatically. In the manual it says:

 

"The application entry point is sotred in the segment _PRESTART. This segment also has got to be associated with a READ_ONLY section".

 

I checked the start08.c file but I could not find a section named _PRESTART or .init

 

Can anyone please advise?

Labels (1)
Tags (1)
0 Kudos
1 Solution
411 Views
CrasyCat
Specialist III

Hello

 

The Linker will rename the section where the entry point is implemented as .init.

Per default application entry point is _Startup, which is implemented in star08.c. So section .text from module start08.c will be renamed internally as .init by the linker.

 

CrasyCat

View solution in original post

0 Kudos
1 Reply
412 Views
CrasyCat
Specialist III

Hello

 

The Linker will rename the section where the entry point is implemented as .init.

Per default application entry point is _Startup, which is implemented in star08.c. So section .text from module start08.c will be renamed internally as .init by the linker.

 

CrasyCat

0 Kudos