diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/defines.txt | 23 | ||||
-rw-r--r-- | docs/porting.txt | 11 |
2 files changed, 31 insertions, 3 deletions
diff --git a/docs/defines.txt b/docs/defines.txt index b23fac9c0..6af44bdd8 100644 --- a/docs/defines.txt +++ b/docs/defines.txt @@ -10,11 +10,28 @@ __USE_GNU, __USE_BSD, __USE_XOPEN[2K], __USE_SVID, __USE_POSIX... If defined, user program which included us requests compat additions from relevant standard or Unix flavor. See features.h for full list. -__USE_FILE_OFFSET64 +_LARGEFILE_SOURCE + If defined, headers will provide functions fseeko and ftello. +_LARGEFILE64_SOURCE + If defined, headers will in addition to data types, constants and + functions named xxx (e.g. off_t, struct stat, F_SETLK, ftruncate()) + supply data types, constants and functions named xxx64 (e.g. off64_t, + struct stat64, F_SETLK64, ftruncate64()) known as an interface for + 64-bit file offsets. __USE_LARGEFILE[64] -_LARGEFILE[64]_SOURCE + Defined to 1 and used internally when built with _LARGEFILE[64]_SOURCE. + Undefined otherwise. + _FILE_OFFSET_BITS - ??? + Select default filesystem interface. When defined as 64 the data types, + constants and functions mentioned in _LARGEFILE64_SOURCE as xxx are + aliased to the corresponding xxx64 data types, constants and functions. + _FILE_OFFSET_BITS=64 enables both __USE_LARGEFILE and __USE_LARGEFILE64. + This flag does not affect the way libc itself is built, it only affects + what declarations are provided to library user. +__USE_FILE_OFFSET64 + Defined to 1 and used internally when built with _FILE_OFFSET_BITS=64. + Undefined otherwise. __THROW Function annotation "I do not throw anything". diff --git a/docs/porting.txt b/docs/porting.txt index 380645801..31c188ae1 100644 --- a/docs/porting.txt +++ b/docs/porting.txt @@ -12,6 +12,8 @@ you are hacking on. the shared library loader work requires you first have basic architecture support working. Thus you should add ARCH_HAS_NO_SHARED and ARCH_HAS_NO_LDSO to Config.ARCH's TARGET_ARCH +- When static pie support is added this TARGET_arch can be appended to the + list in extra/Configs/Config.in ==================== === libc sysdeps === @@ -56,6 +58,15 @@ you are hacking on. usually these are written in assembler, but you may be able to cheat and write them in C ... see other ports for more information +- Once static and pie executables are stable, static-pie support can be + added by modifying crt1.S to calculate the address that the kernel loaded + the main elf. Once the elf load address is found, call reloc_static_pie to + perform all the dynamic relocations normally handled by ldso. This new + code should be placed at the begining of _start and surrounded by defines + so that it is only compiled into rcrt1.o and not the static or shared + versions. This is usually done by using the special L_rcrt1 preprocessor + define. i386 and x86_64 have good reference implementations. + ==================== === ldso sysdeps === ==================== |