Re: suggestion for GCC (1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ali hagigat <hagigatali@xxxxxxxxx> writes:

> Just type "man gcc" and look for -nostdlib option or I have copied
> part of gcc  manual as:
>
> --------------------------------------------
> -nostdlib
> The compiler may generate calls to memcmp,
> memset, memcpy and memmove. These entries are usually resolved by
> entries in libc. These entry points should be supplied through some
> other mechanism when this option is specified.
> --------------------------------------------
>
> As you can see from the manual, compiler still generates some calls to
> those functions, so dear Ian why memcpy is built in according to what
> you wrote?

What I wrote, in the message to which you are replying, is that a
builtin function "is a function which gcc has special knowledge about."
That is completely consistent with gcc generating a call to it.  In
fact, by my definition, every function that for which gcc generates
calls (when the function is not mentioned in the source code) is a
builtin function: obviously gcc will only generate a call to a function
which it has special knowledge about.


>> 5) Ian said:
>> "The compiler does by default treat functions like memcpy as builtins,
>> and ..."
>> If memcpy is built in why gcc still generates some calls to memcpy
>> and memcpy should be provided some how as the manual of gcc says?
>
> Where does the manual say that?

Thanks for the pointer.  What the manual says is that if you use the
-nostdlib option you need to provide memcpy and other functions.  I
assume that your other questions have been answered at this point.

Let me repeat that if you don't like gcc's behaviour in some respect,
you should work to change it.  gcc is free software and it improves by
voluntary contributions.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux