bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/23486] New: GNU_PROPERTY_X86_ISA_1_USED isn't merged properly


From: hjl.tools at gmail dot com
Subject: [Bug ld/23486] New: GNU_PROPERTY_X86_ISA_1_USED isn't merged properly
Date: Sun, 05 Aug 2018 07:39:07 +0000

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

            Bug ID: 23486
           Summary: GNU_PROPERTY_X86_ISA_1_USED isn't merged properly
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

address@hidden property-6]$ cat x.s
        .section ".note.gnu.property", "a"
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
        .long 1f - 0f           /* name length.  */
        .long 3f - 1f           /* data length.  */
        /* NT_GNU_PROPERTY_TYPE_0 */
        .long 5                 /* note type.  */
0:
        .asciz "GNU"            /* vendor name.  */
1:
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
4:
        .long 0xa
5:
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
3:
address@hidden property-6]$ cat y.s
        .section ".note.gnu.property", "a"
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
        .long 1f - 0f           /* name length.  */
        .long 3f - 1f           /* data length.  */
        /* NT_GNU_PROPERTY_TYPE_0 */
        .long 5                 /* note type.  */
0:
        .asciz "GNU"            /* vendor name.  */
1:
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
        .long 0xc0000001        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
4:
        .long 0x3
5:
.ifdef __64_bit__
        .p2align 3
.else
        .p2align 2
.endif
3:
address@hidden property-6]$ make LD=ld x1.o
./as -defsym __64_bit__=1  -o x.o x.s
./as -defsym __64_bit__=1  -o y.o y.s
ld  -r -o x1.o x.o y.o
address@hidden property-6]$ readelf -n x.o y.o x1.o

File: x.o

Displaying notes found in: .note.gnu.property
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA used: 586, SSE

File: y.o

Displaying notes found in: .note.gnu.property
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA needed: i486, 586

File: x1.o

Displaying notes found in: .note.gnu.property
  Owner                 Data size       Description
  GNU                  0x00000020       NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA used: 586, SSE
        x86 ISA needed: i486, 586
address@hidden property-6]$ 

Without GNU_PROPERTY_X86_ISA_1_USED, all ISAs may be used.  When
merging properties from 2 input files, if one input file doesn't
have GNU_PROPERTY_X86_ISA_1_USED, the output file shouldn't have
GNU_PROPERTY_X86_ISA_1_USED.

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