1. 09 5月, 2023 1 次提交
    • C
      Add exit/_Exit to musl dynamic.list · 9f24d33a
      Caoruihong 提交于
      Some DFX features need the ability to interpose exit and/or _Exit to
      do some work at program exit.
      For example, the appspawn service need to handle the exit processing
      logic of all its children process to ensure no unexpected crash when
      exiting.
      
      Issue: #I6ZJJ3
      Signed-off-by: NCaoruihong <crh.cao@huawei.com>
      9f24d33a
  2. 25 1月, 2022 1 次提交
  3. 18 1月, 2022 1 次提交
  4. 11 3月, 2021 1 次提交
  5. 09 9月, 2020 1 次提交
  6. 20 11月, 2018 1 次提交
    • R
      fix regression in access to optopt object · 39ef612a
      Rich Felker 提交于
      commit b9410061 inadvertently omitted
      optopt from the "dynamic list", causing it to be split into separate
      objects that don't share their value if the main program contains a
      copy relocation for it (for non-PIE executables that access it, and
      some PIE ones, depending on arch and toolchain versions/options).
      39ef612a
  7. 19 4月, 2018 1 次提交
    • R
      allow interposition/replacement of allocator (malloc) · c9f415d7
      Rich Felker 提交于
      replacement is subject to conditions on the replacement functions.
      they may only call functions which are async-signal-safe, as specified
      either by POSIX or as an implementation-defined extension. if any
      allocator functions are replaced, at least malloc, realloc, and free
      must be provided. if calloc is not provided, it will behave as
      malloc+memset. any of the memalign-family functions not provided will
      fail with ENOMEM.
      
      in order to implement the above properties, calloc and __memalign
      check that they are using their own malloc or free, respectively.
      choice to check malloc or free is based on considerations of
      supporting __simple_malloc. in order to make this work, calloc is
      split into separate versions for __simple_malloc and full malloc;
      commit ba819787 already did most of
      the split anyway, and completing it saves an extra call frame.
      
      previously, use of -Bsymbolic-functions made dynamic interposition
      impossible. now, we are using an explicit dynamic-list, so add
      allocator functions to the list. most are not referenced anyway, but
      all are added for completeness.
      c9f415d7
  8. 18 4月, 2018 1 次提交
    • R
      use explicit dynamic-list rather than symbolic-functions for linking · b9410061
      Rich Felker 提交于
      we have always bound symbols at libc.so link time rather than runtime
      to minimize startup-time relocations and overhead of calls through the
      PLT, and possibly also to preclude interposition that would not work
      correctly anyway if allowed. historically, binding at link-time was
      also necessary for the dynamic linker to work, but the dynamic linker
      bootstrap overhaul in commit f3ddd173
      made it unnecessary.
      
      our use of -Bsymbolic-functions, rather than -Bsymbolic, was chosen
      because the latter is incompatible with public global data; it makes
      it incompatible with copy relocations in the main program. however,
      not all global data needs to be public. by using --dynamic-list
      instead with an explicit list, we can reduce the number of symbolic
      relocations left for runtime.
      
      this change will also allow us to permit interposition of specific
      functions (e.g. the allocator) if/when we want to, by adding them to
      the dynamic list.
      b9410061