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/19178] ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA confuses prelink


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

--- Comment #20 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, release/2.22/master has been updated
       via  3cdd4ce75bc4d24aca37edc3ecec2a8890ce2551 (commit)
       via  387011e0b6f9cbefd26691f0df8ce76bb7ddfa03 (commit)
      from  5b319ce2949cf6fb97862ff81558944f76c704f1 (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=3cdd4ce75bc4d24aca37edc3ecec2a8890ce2551

commit 3cdd4ce75bc4d24aca37edc3ecec2a8890ce2551
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Nov 10 12:27:24 2015 -0800

    Add a test for prelink output

    This test applies to i386 and x86_64 which set R_386_GLOB_DAT and
    R_X86_64_GLOB_DAT to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA.

        [BZ #19178]
        * sysdeps/x86/Makefile (tests): Add tst-prelink.
        (tst-prelink-ENV): New.
        ($(objpfx)tst-prelink-conflict.out): Likewise.
        ($(objpfx)tst-prelink-cmp.out): Likewise.
        (tests-special): Add $(objpfx)tst-prelink-cmp.out.
        * sysdeps/x86/tst-prelink.c: New file.
        * sysdeps/x86/tst-prelink.exp: Likewise.

    (cherry picked from commit fe534fe8980fa214c410e3661a4216e781073353)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=387011e0b6f9cbefd26691f0df8ce76bb7ddfa03

commit 387011e0b6f9cbefd26691f0df8ce76bb7ddfa03
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Nov 7 06:32:30 2015 -0800

    Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink

    prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
    set to dump the relocation type class from _dl_debug_bindings.  prelink
    has the following relocation type classes:

     #define RTYPE_CLASS_VALID       8
     #define RTYPE_CLASS_PLT         (8|1)
     #define RTYPE_CLASS_COPY        (8|2)
     #define RTYPE_CLASS_TLS         (8|4)

    where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
    RTYPE_CLASS_TLS.

    Since prelink only uses ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
    bits, we should clear the other bits when the DL_DEBUG_PRELINK bit is
    set.

        [BZ #19178]
        * elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
        (RTYPE_CLASS_PLT): Likewise.
        (RTYPE_CLASS_COPY): Likewise.
        (RTYPE_CLASS_TLS): Likewise.
        (_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
        to set relocation type class for DL_DEBUG_PRELINK.  Keep only
        ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
        DL_DEBUG_PRELINK.

    (cherry picked from commit f3d18efb8a720121066dc3401e822043beb98cde)

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

Summary of changes:
 ChangeLog                                        |   23 ++++++++++++++++++++++
 NEWS                                             |    2 +-
 elf/dl-lookup.c                                  |   21 ++++++++++++++++++-
 sysdeps/x86/Makefile                             |   15 ++++++++++++++
 stdlib/tst-system.c => sysdeps/x86/tst-prelink.c |   12 +++++-----
 sysdeps/x86/tst-prelink.exp                      |    1 +
 6 files changed, 65 insertions(+), 9 deletions(-)
 copy stdlib/tst-system.c => sysdeps/x86/tst-prelink.c (80%)
 create mode 100644 sysdeps/x86/tst-prelink.exp

-- 
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]