git: rtld-elf: Sync with FreeBSD

John Marino marino at crater.dragonflybsd.org
Thu Apr 28 13:12:00 PDT 2011


commit fcf53d9b037c8b3b6b834245c8c0eb99b1458e72
Author: John Marino <draco at marino.st>
Date:   Wed Apr 13 21:20:44 2011 +0200

    rtld-elf: Sync with FreeBSD
    
    The DragonFly run-time linker receives its first upgrade since TLS was
    added.  Highlights include improvements to dl functionality:
    
    dlvsym
    dl_iterate_phdr
    _rtld_addr_phdr
    improved dlfunct
    
    Improved security for dangerous LD environment variables were added.
    Several bugs were fixed.
    libmap.conf functionality was added.
    utrace/ktrace support added.
    Improved atexit and cxa_atexit finalization.
    ELF symbol versioning using gnu semantics.
    ldd and kdump improvments
    significant man page updates
    dynamic token expansion functionlity added.
    new locking mechanism
    Support for env var LD_ELF_HINTS_PATH
    Support for RTLD_NODELETE and RTLD_NOLOAD flags for dlopen
    dlfunc moved from libc to rtld
    
    The next GCC upgrade will take advantage of this rtld upgrade in order
    to improve exception handling.  DragonFly has never used the shared
    libgcc_s which has impeded (or broke?) C++ exception handling.
    
    This commit syncs rtld-elf to the FreeBSD cerca 16 DEC 2010.  However,
    bug fixes between then and 25 March 2011 have been included, but major
    functionality changes from the ELF Filter support on 25 DEC 2010 onwards
    has been excluded.

Summary of changes:
 include/dlfcn.h                        |   20 +-
 include/link.h                         |  302 +------
 include/paths.h                        |   10 +-
 lib/libc/gen/Makefile.inc              |    8 +-
 lib/libc/gen/dl_iterate_phdr.3         |  116 +++
 lib/libc/gen/dladdr.3                  |   37 +-
 lib/libc/gen/dlclose.3                 |   79 ++
 lib/libc/gen/dlerror.3                 |   77 ++
 lib/libc/gen/dlfcn.3                   |  103 ++
 lib/libc/gen/dlfcn.c                   |   43 +-
 lib/libc/gen/dlfunc.c                  |   29 -
 lib/libc/gen/dlinfo.3                  |  226 +++--
 lib/libc/gen/dlopen.3                  |  286 ++----
 lib/libc/gen/dlsym.3                   |  224 +++++
 lib/libc/gen/dlvsym.3                  |  117 +++
 lib/libc/gen/elf_utils.c               |   47 +
 lib/libc/include/libc_private.h        |   10 +-
 lib/libc/stdlib/atexit.c               |   31 +-
 lib/libthread_xu/pthread.map           |    4 +-
 lib/libthread_xu/thread/thr_fork.c     |   31 +-
 lib/libthread_xu/thread/thr_private.h  |    6 +-
 libexec/rtld-elf/Makefile              |   14 +-
 libexec/rtld-elf/debug.c               |   17 +-
 libexec/rtld-elf/debug.h               |   15 +-
 libexec/rtld-elf/i386/lockdflt.c       |  185 ----
 libexec/rtld-elf/i386/reloc.c          |   39 +-
 libexec/rtld-elf/i386/rtld_machdep.h   |   47 +-
 libexec/rtld-elf/i386/rtld_start.S     |    3 +-
 libexec/rtld-elf/libmap.c              |  343 +++++++
 libexec/rtld-elf/libmap.h              |    7 +
 libexec/rtld-elf/malloc.c              |   11 +-
 libexec/rtld-elf/map_object.c          |  134 ++-
 libexec/rtld-elf/rtld.1                |  103 ++-
 libexec/rtld-elf/rtld.c                | 1667 ++++++++++++++++++++++++--------
 libexec/rtld-elf/rtld.h                |  153 ++-
 libexec/rtld-elf/rtld_lock.c           |  363 +++++++
 libexec/rtld-elf/rtld_lock.h           |   72 ++
 libexec/rtld-elf/x86_64/lockdflt.c     |  179 ----
 libexec/rtld-elf/x86_64/reloc.c        |   28 +-
 libexec/rtld-elf/x86_64/rtld_machdep.h |   18 +-
 libexec/rtld-elf/x86_64/rtld_start.S   |    5 +-
 share/man/man5/Makefile                |    4 +-
 share/man/man5/libmap.conf.5           |  155 +++
 sys/cpu/i386/include/elf.h             |   50 +-
 sys/cpu/x86_64/include/elf.h           |   15 +-
 sys/sys/elf32.h                        |   47 +-
 sys/sys/elf_common.h                   |  218 +++--
 sys/sys/elf_generic.h                  |   11 +-
 sys/sys/link_elf.h                     |  265 +-----
 usr.bin/kdump/kdump.c                  |  110 +++-
 usr.bin/ldd/ldd.1                      |   35 +-
 usr.bin/ldd/ldd.c                      |   26 +-
 52 files changed, 4079 insertions(+), 2066 deletions(-)
 create mode 100644 lib/libc/gen/dl_iterate_phdr.3
 create mode 100644 lib/libc/gen/dlclose.3
 create mode 100644 lib/libc/gen/dlerror.3
 create mode 100644 lib/libc/gen/dlfcn.3
 delete mode 100644 lib/libc/gen/dlfunc.c
 create mode 100644 lib/libc/gen/dlsym.3
 create mode 100644 lib/libc/gen/dlvsym.3
 create mode 100644 lib/libc/gen/elf_utils.c
 delete mode 100644 libexec/rtld-elf/i386/lockdflt.c
 create mode 100644 libexec/rtld-elf/libmap.c
 create mode 100644 libexec/rtld-elf/libmap.h
 create mode 100644 libexec/rtld-elf/rtld_lock.c
 create mode 100644 libexec/rtld-elf/rtld_lock.h
 delete mode 100644 libexec/rtld-elf/x86_64/lockdflt.c
 create mode 100644 share/man/man5/libmap.conf.5

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fcf53d9b037c8b3b6b834245c8c0eb99b1458e72


-- 
DragonFly BSD source repository





More information about the Commits mailing list