bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/23557] New: [AArch64] Incorrect instruction created for R_AARC


From: david.green at arm dot com
Subject: [Bug gold/23557] New: [AArch64] Incorrect instruction created for R_AARCH64_LD_PREL_LO19
Date: Tue, 21 Aug 2018 14:07:12 +0000

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

            Bug ID: 23557
           Summary: [AArch64] Incorrect instruction created for
                    R_AARCH64_LD_PREL_LO19
           Product: binutils
           Version: 2.32 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: david.green at arm dot com
                CC: ian at airs dot com
  Target Milestone: ---

Created attachment 11200
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11200&action=edit
Larger test file

Using the following code:
binutils-gdb$ cat testsmall.s
        .text

        .globl  f1                      // -- Begin function f1
        .p2align        2
        .type   f1,@function
f1:                                     // @f1
        ldr     x0, val1
        ret
.Lfunc_end0:
        .size   f1, .Lfunc_end0-f1

        .type   val1,@object            // @val1
        .comm   val1,8,8

binutils-gdb$ ./install/bin/as testsmall.s -o testsmall.o
binutils-gdb$ ./install/bin/objdump -dr testsmall.o
0000000000000000 <f1>:
   0:   58000000        ldr     x0, 8 <f1+0x8>
                        0: R_AARCH64_LD_PREL_LO19       val1
   4:   d65f03c0        ret



ld.bfd does OK:

binutils-gdb$ ./install/bin/ld.bfd testsmall.o -o testsmall.elf                 
./install/bin/ld.bfd: warning: cannot find entry symbol _start; defaulting to
00000000004000b0
binutils-gdb$ ./install/bin/objdump -dr testsmall.elf                           
00000000004000b0 <f1>:
  4000b0:       58080040        ldr     x0, 4100b8 <val1>
  4000b4:       d65f03c0        ret


ld.gold produces invalid instructions:
binutils-gdb$ ./install/bin/ld.gold testsmall.o -o testsmall.elf                
binutils-gdb$ ./install/bin/objdump -dr testsmall.elf                           
00000000004000b0 <f1>:
  4000b0:       59000800        .inst   0x59000800 ; undefined
  4000b4:       d65f03c0        ret

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