-ffreestanding option of GCC

ali hagigat hagigatali@gmail.com
Sun Jan 16 08:40:00 GMT 2011


-ffreestanding
A freestanding environment is one in which the standard
library may not exist, and program startup may not necessarily be at main.
--------------------------------------------------------------------------------
I have copied part of gcc manual. The fact that program startup may
not necessarily be at main, is not a special feature which is created
by -ffreestanding option! If we do not specify any option or use
-fhosted, program startup may not necessarily be at main too!!
Why the manual mentions the issue?

> On Wed, Jan 5, 2011 at 8:20 PM, Ian Lance Taylor <iant@google.com> wrote:
>> ali hagigat <hagigatali@gmail.com> writes:
>> The -ffreestanding option directs the compiler to not assume that
>> standard functions have their usual definition, and to not assign any
>> special semantics to the function main.  It does not change the linking
>> behaviour.  You are looking for the -nostdlib option, or possibly
>> -nostartfiles or -nodefaultlibs.
>>
>> Ian
>>
>



More information about the Gcc-help mailing list