[Bug ld/22423] PT_PHDR segment is marked with PF_X

2017-11-12 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22423

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit f882209d9aa5b68d68c45c5849e129ffc228749c
Author: H.J. Lu 
Date:   Sun Nov 12 17:03:50 2017 -0800

ld: Remove PF_X from PT_PHDR segment

It was reasonable to mark PT_PHDR segment with PF_X for compatibility
with UnixWare and Solaris linkers 20 years ago.  But it is inappropriate
today when the primary OS of GNU ld is Linux.  This patch removes PF_X
from PT_PHDR segment as gold does.

Tested natively on Linux/x86 as well as crosss-binutils for alpha-linux,
ia64-linux, powerpc64-linux, powerpc-linux, s390-linux, s390x-linux,
sparc64-linux and sparc-linux.

bfd/

PR ld/22423
* elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
PT_PHDR segment.

ld/

PR ld/22423
* testsuite/ld-alpha/tlsbin.rd: Replace "R E " with "R +" for
PT_PHDR segment.
* testsuite/ld-alpha/tlsbinr.rd: Likewise.
* testsuite/ld-ia64/tlsbin.rd: Likewise.
* testsuite/ld-powerpc/tlsexe.r: Likewise.
* testsuite/ld-powerpc/tlsexe32.r: Likewise.
* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
* testsuite/ld-s390/tlsbin.rd: Likewise.
* testsuite/ld-s390/tlsbin_64.rd: Likewise.
* testsuite/ld-sparc/tlssunbin32.rd: Likewise.
* testsuite/ld-sparc/tlssunbin64.rd: Likewise.
* testsuite/ld-elf/pr22423.d: New test.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22426] New: objcopy with fabricated file

2017-11-12 Thread yeokaiyeat at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22426

Bug ID: 22426
   Summary: objcopy with fabricated file
   Product: binutils
   Version: 2.29
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: yeokaiyeat at hotmail dot com
  Target Milestone: ---

Created attachment 10584
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10584&action=edit
testcase that crashes objcopy

hello, during a fuzzing attempt on objcopy in binutils (2.26.1), fuzzed file
produces a crash when a certain fuzzed input is given. The same file is tested
again in binutils build 2.29.59.20171104

the error produced are as follows:

./objcopy: stYS7rQI : attempt to write out unknown reloc type
./objcopy:stYS7rQI: Invalid operation

===
==8555==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 9 byte(s) in 1 object(s) allocated from:
#0 0x7fdaf84d3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602
#1 0xa755ec in xmalloc xmalloc.c:147

SUMMARY: AddressSanitizer: 9 byte(s) leaked in 1 allocation(s).

attached is the test case

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22426] objcopy crashes with fabricated file

2017-11-12 Thread yeokaiyeat at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22426

ky  changed:

   What|Removed |Added

Summary|objcopy with fabricated |objcopy crashes with
   |file|fabricated file

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22423] PT_PHDR segment is marked with PF_X

2017-11-12 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22423

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.30

--- Comment #4 from H.J. Lu  ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils