This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/22101] Dynamic loader must ignore "debug" shared objects e.g. ET_GNU_DEBUG_*


https://sourceware.org/bugzilla/show_bug.cgi?id=22101

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  592d5c75392e1da170050a4999af0618c4865aed (commit)
      from  2d9193f2f55767c71333d425e140e22c3e15dc3d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=592d5c75392e1da170050a4999af0618c4865aed

commit 592d5c75392e1da170050a4999af0618c4865aed
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Sep 26 13:49:48 2017 -0700

    Skip PT_DYNAMIC segment with p_filesz == 0 [BZ #22101]

    ELF objects generated with "objcopy --only-keep-debug" have

    Type     Offset  VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
    DYNAMIC  0x0+e28 0x0+200e40 0x0+200e40 0x0+    0x0+1a0 RW  0x8

    with 0 file size. ld.so should skip such PT_DYNAMIC segments.

    Without a PT_DYNAMIC segment the loading of the shared object will
    fail, and therefore ldd on such objects will also fail instead of
    crashing. This provides better diagnostics for tooling that is
    attempting to inspect the invalid shared objects which may just
    contain debug information.

        [BZ #22101]
        * elf/Makefile (tests): Add tst-debug1.
        ($(objpfx)tst-debug1): New.
        ($(objpfx)tst-debug1.out): Likewise.
        ($(objpfx)tst-debug1mod1.so): Likewise.
        * elf/dl-load.c (_dl_map_object_from_fd): Skip PT_DYNAMIC segment
        with p_filesz == 0.
        * elf/tst-debug1.c: New file.

    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |   11 +++++++++++
 elf/Makefile                        |    9 ++++++++-
 elf/dl-load.c                       |   10 ++++++++--
 elf/{tst-audit11.c => tst-debug1.c} |   13 ++++++-------
 4 files changed, 33 insertions(+), 10 deletions(-)
 copy elf/{tst-audit11.c => tst-debug1.c} (75%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]