Diff for /wikisrc/symbol_versions.mdwn between versions 1.4 and 1.5

version 1.4, 2021/01/05 02:20:44 version 1.5, 2021/01/05 02:23:32
Line 71  function, they must use the symbol `__ti Line 71  function, they must use the symbol `__ti
 **Similarly, programs that use `LD_PRELOAD` (see  **Similarly, programs that use `LD_PRELOAD` (see
 [[!template id=man name="ld.elf_so" section="3"]])  [[!template id=man name="ld.elf_so" section="3"]])
 to interpose their own definitions of symbols, such as  to interpose their own definitions of symbols, such as
   [[!template id=man name="rumphijack" section="3"]]
   and
 [torsocks](https://gitlab.torproject.org/legacy/trac/-/wikis/doc/torsocks),  [torsocks](https://gitlab.torproject.org/legacy/trac/-/wikis/doc/torsocks),
 must know to define `__time50` if they want to replace the new  must know to define `__time50` if they want to replace the new
 semantics in new programs, or `time` if they want to replace the old  semantics in new programs, or `time` if they want to replace the old
Line 89  On NetBSD, it should be reserved for cer Line 91  On NetBSD, it should be reserved for cer
 like `malloc` and `free` (and `calloc` and everything else in that  like `malloc` and `free` (and `calloc` and everything else in that
 family), and some system call stubs; except for the `__...50`  family), and some system call stubs; except for the `__...50`
 pseudo-versioned renames of public functions, you should not try to  pseudo-versioned renames of public functions, you should not try to
 interpose your own definition of any symbol beginning with `_`, which  interpose your own definition of any symbol beginning with ‘`_`’ (a
 is reserved to the implementation in C.  single underscore), which is reserved to the implementation in C.
   
 # Appendix: ELF symbol versions  # Appendix: ELF symbol versions
   
 The renaming scheme of `__time50` is informal -- any symbol can be  The renaming scheme of `__time50` is informal -- any symbol can be
 renamed the same way, and NetBSD uses it for some other purposes, such  renamed the same way, and NetBSD uses it for some other purposes too,
 as exposing a slightly different  such as exposing a slightly different
 [[!template id=man name="rename" section="2"]]  [[!template id=man name="rename" section="2"]]
 function via the symbol `__posix_rename` in programs that define  function via the symbol `__posix_rename` in programs that define
 `_POSIX_C_SOURCE` but not `_NETBSD_SOURCE`.  `_POSIX_C_SOURCE` but not `_NETBSD_SOURCE`.
Line 105  The GNU ELF toolchain (gcc, ld, &c.) sup Line 107  The GNU ELF toolchain (gcc, ld, &c.) sup
 ‘symbol versions’ with sections called `.gnu.version` (associating  ‘symbol versions’ with sections called `.gnu.version` (associating
 versions with symbols), `.gnu.version_d` (versions defined in an  versions with symbols), `.gnu.version_d` (versions defined in an
 object), and `.gnu.version_n` (versions needed in an object).  object), and `.gnu.version_n` (versions needed in an object).
 As of 2020, NetBSD does not use ELF symbol versions (although the  As of 2020, NetBSD does not use ELF symbol versions, although the
 linker and loader support them).  linker and loader support them for libraries developed outside NetBSD.
   
 The semantics is:  The semantics is:
   

Removed from v.1.4  
changed lines
  Added in v.1.5


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb