bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/23503] New: -Ttext= doesn't work right with GNU property


From: hjl.tools at gmail dot com
Subject: [Bug gold/23503] New: -Ttext= doesn't work right with GNU property
Date: Fri, 10 Aug 2018 13:21:29 +0000

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

            Bug ID: 23503
           Summary: -Ttext= doesn't work right with GNU property
           Product: binutils
           Version: 2.32 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: hjl.tools at gmail dot com
                CC: ian at airs dot com
  Target Milestone: ---

address@hidden gold-2]$ 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:

        .text
        .globl _start
_start:
        ret
address@hidden gold-2]$ make
/usr/bin/as -defsym __64_bit__=1  -o x.o x.s
ld.bfd -Ttext=0x1000200 -Tdata=0x2000000 -o x1 x.o
ld.gold -Ttext=0x1000200 -Tdata=0x2000000 -o x1.gold x.o
nm x1 | grep " _start"
0000000001000200 T _start  <<<<<<< ld is OK.
nm x1.gold | grep " _start"
0000000001000220 T _start <<<<<<<< gold is off by 0x20.
address@hidden gold-2]$

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