473,804 Members | 3,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want to know about C-startup Routine contents and its modification

Hi All,

I am very interest to know the c-startup routine (like GNU gcc C-startup
routine). and it s working principle and How this function is attached to
operating system
Thanks in adavance.

with regards
Ramaraj
Nov 13 '05 #1
6 5046
Ramaraj wrote:
I am very interest to know the c-startup routine (like GNU gcc
C-startup routine). and it s working principle and How this
function is attached to operating system


Ramaraj...

The startup function is platform/implementation specific and not
a standardized part of the C language. Why not take a look at the
compiler and library documentation?

For gcc, you can actually look at the source code and answer your
own question more quickly than anyone here could provide you with
a complete answer.
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c

Nov 13 '05 #2
In <QD************ ****@news.uswes t.net> Morris Dovey <mr*****@iedu.c om> writes:
Ramaraj wrote:
I am very interest to know the c-startup routine (like GNU gcc
C-startup routine). and it s working principle and How this
function is attached to operating system


Ramaraj...

The startup function is platform/implementation specific and not
a standardized part of the C language. Why not take a look at the
compiler and library documentation?


In my experience, people asking this kind of questions should better
spend their time actually learning C. By the time you actually understand
what really C is about, the interest for such issues is very likely to
vanish: as a C programmer, you couldn't care less.

By the time you're confronted with writing a C startup module yourself,
you have enough clues to realise that c.l.c is one of the last newsgroups
to ask for help.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #3
In <GY************ *****@news.uswe st.net> Morris Dovey <mr*****@iedu.c om> writes:
Dan Pop wrote:
In <QD************ ****@news.uswes t.net> Morris Dovey
<mr*****@iedu.c om> writes:
Ramaraj wrote:

I am very interest to know the c-startup routine (like GNU
gcc C-startup routine). and it s working principle and How
this function is attached to operating system ^^^
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Ramaraj...

The startup function is platform/implementation specific and
not a standardized part of the C language. Why not take a
look at the compiler and library documentation?


In my experience, people asking this kind of questions should
better spend their time actually learning C. By the time you
actually understand what really C is about, the interest for
such issues is very likely to vanish: as a C programmer, you
couldn't care less.


True - except that at one point I found myself writing a startup
function for an embedded system (along with the code to produce
argc and argv along with a split 'shell', half of which ran on an
NT system and half on the SoC under test).
By the time you're confronted with writing a C startup module
yourself, you have enough clues to realise that c.l.c is one
of the last newsgroups to ask for help.


/Usually/ true. I didn't search to see if Ramaraj is new to c.l.c
- I just assumed that he found himself in a situation similar to
that described above.


Nope, he was explicitly talking about hosted implementations , where one
seldom gets to write a startup module. See the underlined text above.

Freestanding implementations are a completely different issue, as each
case has unique requirements:

- is there any main function?

- if yes, does it take any arguments?

- is there any initialisation code executed before the startup module?

- is the program supposed to ever terminate?

- etc etc etc

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #4
Dan Pop wrote:
In <GY************ *****@news.uswe st.net> Morris Dovey

Ramaraj wrote:

> I am very interest to know the c-startup routine (like
> GNU gcc C-startup routine). and it s working principle
> and How this function is attached to operating system
> ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^
Nope, he was explicitly talking about hosted implementations ,
where one seldom gets to write a startup module. See the
underlined text above.


Oops! You're right (bad assumption on my part) - thanks for
underlining. Suddenly I'm in complete agreement. :-)
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c

Nov 13 '05 #5
The C startup routine does the following:
- Initialize all global variables to 0
- Call standard library init
- Prepares argc and argv
- Calls main

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - Generate Message Sequence Charts in PDF
Nov 13 '05 #6
Sandeep wrote:
The C startup routine does the following:
- Initialize all global variables to 0
- Call standard library init
- Prepares argc and argv
- Calls main


Sandeep...

Perhaps (more or less; possibly more /and/ less :-)

[less] One would hope that the compiler emits code that
pre-initializes all globals;

[more] If the startup function calls main directly, then it will
also need to provide for main's return.

This /is/ off-topic for comp.lang.c because nearly every aspect
of the subject is platform/implementation dependent; and the OP's
question has nothing to do with the C language itself; but rather
with a particular implementation (gcc) whose startup function is
likely to vary at least somewhat for each target platform.

Since the OP didn't specify a platform, providing a list of
specifics is almost certainly a misleading response - however
well-intended.
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2656
by: mr.iali | last post by:
Hi Everyone I would like to get into software developent using a programming language like c++, java or pl/sql for oracle. I have no idea where to start from. Which language is there more demand for. Looking at jobs there seems to be a better chance in getting a java job rather than a oracle or c++ job. Also is java and oracle a good combiantion?
16
2003
by: G Patel | last post by:
Hi, If I want to call functions that don't return int without declaring them, will there be any harm? I only want to assign the function(return value) to the type that it returns, so I don't see how the return value comes to play here. Ex
10
44484
by: Atul | last post by:
Hi, I just stepped into C#. I am facing one problem. Here is the scenario. I am posting some data to one website (https site). It returns me response HTML. I want to parse this HTML and want to look for some specific tags. To achieve the same, I wanted to use MSHTMLs HTMLDocumentClass Interface. I dont know how to use it in C#. I am using .NET framework 1.1. For posting the data, I am using XMLHTTP class. Any help is highly appreciated.
4
1599
by: Junjie Wang | last post by:
It seems the aspx always is saved in IE history, how to write aspx that make IE does not save it ? Thanks. -Junjie
182
7574
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
1
1579
by: _thedebugger | last post by:
Dear Friends, We are developing one wbesite in visual studio 2005 and sql server 2000. now my question is I want to seperate some modules on the website. Like 1. there will be few sections, like general listing of winners and users and other products. 2. Game Play Panel, Where user will use their username and password and credit card details and play the game.
21
6526
by: Russell Hoover | last post by:
I want to make sure that no border (around a specific small "blog-button" image) ever appears in FF or IE, or any other browswer. I couldn't seem do it with xhtml, so I reverted to border="0" inside the "img" tag. This of course does not validate as xhtml. it does what I want it to do (gets rid of the border, in both browsers), but I want all my code to be validated, well-formed xhtml.
6
2321
by: damod.php | last post by:
hai , friends, am new one to this group, I want to know About frame works in php Which one is best i want learn any one frame work can you help me Am workin in PHP MY SQL i want to learn it. which one is esy and best and peek pls help me thanks
7
4661
by: Gary | last post by:
Hello guys! Bear with me, I am a newbie. She is the Data Warehouse manager. She has about 50 users to use the Oracle database from M$ Access via ODBC connection. All those users have only SELECT privileges on certain tables. I built all the roles and users for them and they work fine. Then she asked "Why do YOU let them see all those system tables?",
8
2453
by: =?GB2312?B?yum09MXt?= | last post by:
today I forgot to include some header,then I found the error message by the compiler is quite strange. so I want to know exactly the inner details of the compiler impletation,if possible. and I want to know what does the standard say about this situation. here is the code just to demonstrate the error.
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.