Re: Minimum requirements for a custom libc

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

 



On Tue, 2025-05-27 at 09:33 +0100, Jonathan Wakely wrote:
> 
> 
> On Tue, 27 May 2025, 07:04 Basile Starynkevitch, <basile@xxxxxxxxxxxxxxxxx>
> wrote:
> > On Sat, 2025-03-15 at 15:18 +0000, Johannes Krottmayer via Gcc-help wrote:
> > > Dear GCC community!
> > > 
> > > I have started a custom libc implementation for the purpose of
> > > education.
> > > 
> > > What are the minimum requirements for the library (functions,
> > > headers, ...) which one *must* be implemented so GCC can use this 
> > > library as default?
> > 
> > GCC is used to compile code without any libc. T

> > Actually I don't understand your question.
> 
> It's a perfectly reasonable question (but I don't know the answer). 
> 
> GCC assumes certain functions are always present, e.g. memcpy is needed for
> copying large structs on the stack. The question is which functions does it
> need. Your answer isn't really relevant to the question. 


memcpy is actually a builtin inside GCC. and has to be one because many
processors (including x86-64 and ARM) has specific machine instructions to
implement it efficiently.



-- 
Basile STARYNKEVITCH                            <basile@xxxxxxxxxxxxxxxxx>
8 rue de la Faïencerie                       http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                         https://github.com/bstarynk
France                                https://github.com/RefPerSys/RefPerSys




[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