1. 05 8月, 2012 3 次提交
  2. 13 7月, 2012 1 次提交
  3. 11 7月, 2012 2 次提交
    • R
      make dynamic linker depend on -DSHARED not -fPIC · e864a290
      Rich Felker 提交于
      if libc.a is compiled PIC for use in static PIE code, this should not
      cause the dynamic linker (which still does not support static-linked
      main program) to be built into libc.a.
      e864a290
    • R
      fix lots of breakage on dlopen, mostly with explicit pathnames · 0420b874
      Rich Felker 提交于
      most importantly, the name for such libs was being set from an
      uninitialized buffer. also, shortname always had an initial '/'
      character, making it useless for looking up already-loaded libraries
      by name, and thus causing repeated searches through the library path.
      
      major changes now:
      
      - shortname is the base name for library lookups with no explicit
        pathname. it's initially clear for libraries loaded with an explicit
        pathname (and for the main program), but will be set if the same
        library (detected via inodes match) is later found by a search.
      
      - exact name match is never used to identify libraries loaded with an
        explicit pathname. in this case, there's no explicit search, so we
        can just stat the file and check for inode match.
      0420b874
  4. 08 7月, 2012 1 次提交
    • R
      fix dlsym RTLD_NEXT support · d93e028c
      Rich Felker 提交于
      previously this was being handled the same as a library-specific,
      dependency-order lookup on the next library in the global chain, which
      is likely to be utterly meaningless. instead the lookup needs to be in
      the global namespace, but omitting the initial portion of the global
      library chain up through the calling library.
      d93e028c
  5. 10 6月, 2012 1 次提交
  6. 06 6月, 2012 1 次提交
    • R
      treat failure of mprotect in map_library as a fatal load failure · f7d15dcc
      Rich Felker 提交于
      the error will propagate up and be printed to the user at program
      start time; at runtime, dlopen will just fail and leave a message for
      dlerror.
      
      previously, if mprotect failed, subsequent attempts to perform
      relocations would crash the program. this was resulting in an
      increasing number of false bug reports on grsec systems where rwx
      permission is not possible in cases where users were wrongly
      attempting to use non-PIC code in shared libraries. supporting that
      usage is in theory possible, but the x86_64 toolchain does not even
      support textrels, and the cost of keeping around the necessary
      information to handle textrels without rwx permissions is
      disproportionate to the benefit (which is essentially just supporting
      broken library setups on grsec machines).
      
      also, i unified the error-out code in map_library now that there are 3
      places from which munmap might have to be called.
      f7d15dcc
  7. 28 5月, 2012 1 次提交
  8. 05 5月, 2012 1 次提交
  9. 04 5月, 2012 1 次提交
    • R
      overhaul SSP support to use a real canary · 58aa5f45
      Rich Felker 提交于
      pthread structure has been adjusted to match the glibc/GCC abi for
      where the canary is stored on i386 and x86_64. it will need variants
      for other archs to provide the added security of the canary's entropy,
      but even without that it still works as well as the old "minimal" ssp
      support. eventually such changes will be made anyway, since they are
      also needed for GCC/C11 thread-local storage support (not yet
      implemented).
      
      care is taken not to attempt initializing the thread pointer unless
      the program actually uses SSP (by reference to __stack_chk_fail).
      58aa5f45
  10. 25 4月, 2012 2 次提交
    • R
      gdb shared library debugging support · 3ec8d29c
      Rich Felker 提交于
      provide the minimal level of dynamic linker-to-debugger glue needed to
      let gdb find loaded libraries and load their symbols.
      3ec8d29c
    • R
      first attempt at enabling stack protector support · 60872cf9
      Rich Felker 提交于
      the code is written to pre-init the thread pointer in static linked
      programs that pull in __stack_chk_fail or dynamic-linked programs that
      lookup the symbol. no explicit canary is set; the canary will be
      whatever happens to be in the thread structure at the offset gcc
      hard-coded. this can be improved later.
      60872cf9
  11. 24 4月, 2012 1 次提交
    • R
      make dlerror produce informative results · a5d10eb1
      Rich Felker 提交于
      note that dlerror is specified to be non-thread-safe, so no locking is
      performed on the error flag or message aside from the rwlock already
      held by dlopen or dlsym. if 2 invocations of dlsym are generating
      errors at the same time, they could clobber each other's results, but
      the resulting string, albeit corrupt, will still be null-terminated.
      any use of dlerror in such a situation could not be expected to give
      meaningful results anyway.
      a5d10eb1
  12. 23 3月, 2012 1 次提交
    • R
      make dlerror conform to posix · a9e85c0a
      Rich Felker 提交于
      the error status is required to be sticky after failure of dlopen or
      dlsym until cleared by dlerror. applications and especially libraries
      should never rely on this since it is not thread-safe and subject to
      race conditions, but glib does anyway.
      a9e85c0a
  13. 08 2月, 2012 2 次提交
  14. 07 2月, 2012 2 次提交
  15. 03 2月, 2012 1 次提交
    • R
      include dummied-out dlopen and dlsym functions for static binaries · 5a09a530
      Rich Felker 提交于
      these don't work (or do anything at all) but at least make it possible
      to static link programs that insist on "having" dynamic loading
      support...as long as they don't actually need to use it.
      
      adding real support for dlopen/dlsym with static linking is going to
      be significantly more difficult...
      5a09a530
  16. 24 1月, 2012 1 次提交
  17. 23 1月, 2012 2 次提交
  18. 21 1月, 2012 1 次提交
    • R
      fix dynamic linker not to depend on DYNAMIC ptr in 0th entry of GOT · 0b6dc097
      Rich Felker 提交于
      this fixes an issue using gold instead of gnu ld for linking. it also
      should eliminate the need of the startup code to even load/pass the
      got address to the dynamic linker.
      
      based on patch submitted by sh4rm4 with minor cosmetic changes.
      
      further cleanup will follow.
      0b6dc097
  19. 17 1月, 2012 1 次提交
  20. 19 9月, 2011 1 次提交
  21. 16 8月, 2011 4 次提交
  22. 25 7月, 2011 1 次提交
  23. 24 7月, 2011 3 次提交
  24. 02 7月, 2011 1 次提交
  25. 01 7月, 2011 1 次提交
  26. 29 6月, 2011 3 次提交