bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfault


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64
Date: Thu, 13 Aug 2015 11:40:58 +0000

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

--- Comment #13 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <address@hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8efa2874ab298f3923f4127340da119435f87c39

commit 8efa2874ab298f3923f4127340da119435f87c39
Author: H.J. Lu <address@hidden>
Date:   Thu Aug 13 04:31:38 2015 -0700

    Issue an error for read-only segment with dynamic IFUNC relocations

    To load an ELF binary with DT_TEXTREL tag, the dynamic linker calls
    __mprotect on the read-only segment with PROT_READ|PROT_WRITE before
    applying dynamic relocation.  It leads to segfault when performing
    IFUNC relocations since the read-only segment has no execute permission.
    This patch changes x86 linker to issue an error for read-only segment
    with dynamic IFUNC relocations.  Other backends with IFUNC support
    may need a similar change.

    bfd/

        PR ld/18801
        * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
        for read-only segment with dynamic IFUNC relocations.
        * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.

    ld/testsuite/

        PR ld/18801
        * ld-i386/i386.exp: Run pr18801.
        * ld-x86-64/x86-64.exp: Likewise.
        * ld-i386/pr18801.d: New file.
        * ld-i386/pr18801.s: Likewise.
        * ld-x86-64/pr18801.d: Likewise.
        * ld-x86-64/pr18801.s: Likewise.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]