2023-12-22 16:39:03 +00:00
|
|
|
---
|
|
|
|
tags:
|
|
|
|
- low-level
|
|
|
|
---
|
2023-05-31 22:07:27 +01:00
|
|
|
- How data structures & computational routines are accessed in machine code ([Code Types](Code%20Types.md))
|
2023-05-20 01:33:56 +01:00
|
|
|
- Machine code therefore hardware-dependent
|
|
|
|
- API defines this structure in source code
|
|
|
|
- Adherence usually responsibility of
|
2023-05-31 22:11:34 +01:00
|
|
|
- [Compilers](Compilers.md)
|
2023-05-20 01:33:56 +01:00
|
|
|
- OS
|
|
|
|
- Library author
|
|
|
|
|
|
|
|
# Components
|
|
|
|
|
|
|
|
- Processor instruction set
|
|
|
|
- Register file structure
|
|
|
|
- Stack organisation
|
|
|
|
- Memory access types
|
|
|
|
- Size, layouts and alignments of basic data types
|
2023-05-31 22:11:34 +01:00
|
|
|
- [Calling Conventions](Calling%20Conventions.md)
|
2023-05-20 01:33:56 +01:00
|
|
|
- How function arguments are passed
|
|
|
|
- Stack or register
|
|
|
|
- Which registers for which function param
|
|
|
|
- Parameter order
|
|
|
|
- Return values retrieved
|
|
|
|
- How app makes sys calls to OS
|
|
|
|
- If ABI specifies direct sys calls over procedure calls to sys call stubs then sys call numbers
|
|
|
|
- Binary format of object files, program files
|
|
|
|
- For complete OS ABIs
|
|
|
|
|
|
|
|
# Complete ABI
|
|
|
|
- Allows program from one OS to run on any other without change
|
|
|
|
- Provided all shared libraries and prerequisites etc
|
|
|
|
|
|
|
|
# Embedded ABI
|
|
|
|
- File format, data types, register usage, stack frame organisation, function parameter passing conventions
|
|
|
|
- For embedded OS
|
2023-05-31 22:11:34 +01:00
|
|
|
- [Compilers](Compilers.md) create object code compatible with code from other [compilers](Compilers.md)
|
|
|
|
- Link libraries from different [compilers](Compilers.md)
|