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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,210 次查看
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?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
895 次查看
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 项奖励
回复
1 回复
896 次查看
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 项奖励
回复