Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

Chapter 5.  Modifying libgloss

5.1. The Platform Directory
5.1.1. Ensuring the Platform Directory is Configured
5.2. The C Runtime Initialization, crt0.o
5.2.1. Exception vector setup
5.2.2. The _start Function and Stack Initialization
5.2.3. Cache Initialization
5.2.4. Clearing BSS
5.2.5. Constructor and Destructor Handling
5.2.6. C Initialization Functions
5.2.7. Invoking the main program
5.3. Standard System Call Implementations
5.3.1. Error Handling
5.3.2. The Global Environment, environ
5.3.3. Exit a program, _exit
5.3.4. Closing a file, close
5.3.5. Transfer Control to a New Process, execve
5.3.6. Create a new process, fork
5.3.7. Provide the Status of an Open File, fstat
5.3.8. Get the Current Process ID, getpid
5.3.9. Determine the Nature of a Stream, isatty
5.3.10. Send a Signal, kill
5.3.11. Rename an existing file, link
5.3.12. Set Position in a File, lseek
5.3.13. Open a file, open
5.3.14. Read from a File, read
5.3.15. Allocate more Heap, sbrk
5.3.16. Status of a File (by Name), stat
5.3.17. Provide Process Timing Information, times
5.3.18. Remove a File's Directory Entry, unlink
5.3.19. Wait for a Child Process, wait
5.3.20. Write to a File, write
5.4. Reentrant System Call Implementations
5.5. BSP Configuration and Make file;
5.5.1. configure.in for the BSP
5.5.2. Makefile.in for the BSP
5.6. The Default BSP, libnosys

Any target architecture may need multiple implementations, suited to different platforms on which the code may run. The connection between the library and a specific platform is known as a Board Support Package (BSP). In recent versions of newlib, BSPs are separated out into their own library, libgloss, the source for which is in the top level libgloss directory.

For newlib the BSP within libgloss comprises an implementation of the C runtime initialization, crt0.o, a definition of one global data structure, and implementation of eighteen system calls for each platform.

[Note]Note

libgloss is a relatively new addition to newlib. Some older ports still have the BSP code within the newlib directory.

Embecosm divider strip