[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21231] New: readelf fails to dump NT_GNU_PROPERTY_TYPE_0 n
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug binutils/21231] New: readelf fails to dump NT_GNU_PROPERTY_TYPE_0 note |
Date: |
Tue, 07 Mar 2017 19:10:53 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21231
Bug ID: 21231
Summary: readelf fails to dump NT_GNU_PROPERTY_TYPE_0 note
Product: binutils
Version: 2.29 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
address@hidden property-1]$ cat i.S
#ifndef NT_GNU_PROPERTY_TYPE_0
# define NT_GNU_PROPERTY_TYPE_0 5
#endif
#ifndef GNU_PROPERTY_STACK_SIZE
# define GNU_PROPERTY_STACK_SIZE 1
#endif
#ifndef GNU_PROPERTY_NO_COPY_ON_PROTECTED
# define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
#endif
#ifndef GNU_PROPERTY_X86_ISA_1_USED
# define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
#endif
#ifndef GNU_PROPERTY_X86_ISA_1_NEEDED
# define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
#endif
.section ".note.gnu.property", "a"
#if __SIZEOF_PTRDIFF_T__ == 8
.p2align 3
#elif __SIZEOF_PTRDIFF_T__ == 4
.p2align 2
#else
# error Unsupported pointer size!
#endif
.long 1f - 0f /* name length */
.long 4f - 2f /* data length */
.long NT_GNU_PROPERTY_TYPE_0 /* note type */
0: .asciz "GNU" /* vendor name */
1: .p2align 2
2: .long GNU_PROPERTY_STACK_SIZE /* pr_type. */
.long 9f - 3f /* pr_datasz. */
3:
.dc.a 0x800000 /* Stack size. */
9:
#if __SIZEOF_PTRDIFF_T__ == 8
.p2align 3
#elif __SIZEOF_PTRDIFF_T__ == 4
.p2align 2
#endif
.long GNU_PROPERTY_NO_COPY_ON_PROTECTED /* pr_type. */
.long 0 /* pr_datasz. */
#if __SIZEOF_PTRDIFF_T__ == 8
.p2align 3
#elif __SIZEOF_PTRDIFF_T__ == 4
.p2align 2
#endif
.long GNU_PROPERTY_X86_ISA_1_USED /* pr_type. */
.long 9f - 8f /* pr_datasz. */
8:
.long -1
9:
#if __SIZEOF_PTRDIFF_T__ == 8
.p2align 3
#elif __SIZEOF_PTRDIFF_T__ == 4
.p2align 2
#endif
.long GNU_PROPERTY_X86_ISA_1_NEEDED /* pr_type. */
.long 9f - 8f /* pr_datasz. */
8:
.long 0xffff
9:
#if __SIZEOF_PTRDIFF_T__ == 8
.p2align 3
#elif __SIZEOF_PTRDIFF_T__ == 4
.p2align 2
#endif
4:
address@hidden property-1]$ make i.o
gcc -B./ -c -o i.o i.S
address@hidden property-1]$ ./readelf -n i.o
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000038 NT_GNU_PROPERTY_TYPE_0
Properties: <unknown type 0x800000001 data: corrupt datasz: 0x800000>
address@hidden property-1]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/21231] New: readelf fails to dump NT_GNU_PROPERTY_TYPE_0 note,
hjl.tools at gmail dot com <=