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 foo@gottpoff(%rip), %reg
addq foo@gottpoff(%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.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils