bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/17482] New: -melf32_x86_64 IE->LE transition error


From: amodra at gmail dot com
Subject: [Bug ld/17482] New: -melf32_x86_64 IE->LE transition error
Date: Tue, 14 Oct 2014 01:35:05 +0000

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

            Bug ID: 17482
           Summary: -melf32_x86_64 IE->LE transition error
           Product: binutils
           Version: 2.25 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: amodra at gmail dot com

Reported in pr17453, ld-new -o tmpdir/tlsie4
-L/var/tmp/binutils-gdb/ld/testsuite/ld-x86-64 -melf32_x86_64 tmpdir/tlsie4.o
accesses one byte before start of "contents".  Here, when roff==2:

          /* IE->LE transition:
             Originally it can be one of:
             movq address@hidden(%rip), %reg
             addq address@hidden(%rip), %reg
             We change it into:
             movq $foo, %reg
             leaq foo(%reg), %reg
             addq $foo, %reg.  */

          unsigned int val, type, reg;

          val = bfd_get_8 (input_bfd, contents + roff - 3);

This is obviously wrong.  What's more, "val" (really one of the rex prefixes)
affects the output insns.  If the insn wasn't at the start of a section, it is
quite possible for a previous insn to end with a byte that happens to look like
a rex prefix.

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