[prev in list] [next in list] [prev in thread] [next in thread]
List: binutils-bugs
Subject: [Bug gas/20744] New: [PPC] Incorrect relocation for VLE-instructions
From: "volodia () hex-rays ! com" <sourceware-bugzilla () sourceware ! org>
Date: 2016-10-29 11:25:59
Message-ID: bug-20744-70 () http ! sourceware ! org/bugzilla/
[Download RAW message or body]
https://sourceware.org/bugzilla/show_bug.cgi?id=20744
Bug ID: 20744
Summary: [PPC] Incorrect relocation for VLE-instructions
Product: binutils
Version: 2.26
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: volodia@hex-rays.com
Target Milestone: ---
According to "Power ISA Version 2.07, Book VLE, 5.9" for the VLE-instruction
"e_lis" an immediate operand is coded in bits 11..15 and 21..31 so to store it
the relocation of type 16A (R_PPC_VLE_HI16A) should be used.
But gas generates an object file which uses the relocation R_PPC_VLE_HI16D.
The bug is in "2012-05-14 James Lemke Add support for PowerPC VLE."
Variables "use_d_reloc" and "use_a_reloc" are interchanged.
The test (ppc_vle_2.s):
# powerpc64-linux-gnu-as -o ppc_vle_2.o -a32 -mvle ppc_vle_2.s
.section ".text"
.align 2
.globl func
.type func, @function
byte_4000D46F:
.byte 1, 2
func:
e_lis 7, byte_4000D46F@ha
e_lbz 7, byte_4000D46F@l(7)
e_xori 0, 7, 0x80
cntlzw 3, 0
se_srwi 3, 5
se_blr
The result (readelf -r ppc_vle_2.o):
Relocation section '.rela.text' at offset 0xe8 contains 2 entries:
Offset Info Type Sym.Value Sym. Name + Addend
00000002 000001e0 R_PPC_VLE_HA16D 00000000 .text + 0
00000008 00000104 R_PPC_ADDR16_LO 00000000 .text + 0
--
You are receiving this mail because:
You are on the CC list for the bug.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic