[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-03-02 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #12 from Alan Modra  ---
Re comment #10 and #11: git commit 673cff9b8b
https://sourceware.org/ml/binutils/2017-03/msg00016.html

Missed the cutoff for the 2.28 release, unfortunately.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-03-02 Thread alfedotov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #11 from Alexander Fedotov  ---
(In reply to Alan Modra from comment #9)
> Fixed those issues

Hi Alan

In ppc_elf_vle_split16():
opcode = insn & 0xf300f800;

I think correct mask is 0xfc00f800

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-03-01 Thread alfedotov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #10 from Alexander Fedotov  ---
Hi Alan

In ppc_elf_vle_split16():
opcode = insn & 0xf300f800;

I think correct mask is 0xfc00f800

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-02-23 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alan Modra  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Alan Modra  ---
Fixed those issues

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-02-22 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #8 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Alan Modra
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=55ff522848fef1fc5323060fd042d0988e71d4b9

commit 55ff522848fef1fc5323060fd042d0988e71d4b9
Author: Alan Modra 
Date:   Thu Feb 23 12:20:42 2017 +1030

Correct VLE 16D and SDAREL relocations

PR 20744
bfd/
* elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
16D relocations.
(ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
(ppc_elf_relocate_section): Correct calculation for VLE SDAREL
relocs.
ld/
* testsuite/ld-powerpc/vle-reloc-2.s: Use r6 for last insn of
each group.
* testsuite/ld-powerpc/vle-reloc-2.d: Update for above change
and sdarel reloc fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-02-22 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #7 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5499c7c71cc403a1deff90b79ab41d17efc5c4cc

commit 5499c7c71cc403a1deff90b79ab41d17efc5c4cc
Author: Alan Modra 
Date:   Thu Feb 23 12:20:42 2017 +1030

Correct VLE 16D and SDAREL relocations

PR 20744
bfd/
* elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
16D relocations.
(ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
(ppc_elf_relocate_section): Correct calculation for VLE SDAREL
relocs.
ld/
* testsuite/ld-powerpc/vle-reloc-2.s: Use r6 for last insn of
each group.
* testsuite/ld-powerpc/vle-reloc-2.d: Update for above change
and sdarel reloc fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-02-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alan Modra  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #6 from Alan Modra  ---
You're correct, there is yet another bug with the VLE support of these
relocations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2017-02-22 Thread alfedotov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alexander Fedotov  changed:

   What|Removed |Added

 CC||alfedotov at gmail dot com

--- Comment #5 from Alexander Fedotov  ---
Hi Alan
Are you sure about shift = 9 ?

It seems shift should be 10.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2016-11-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.28

--- Comment #4 from Alan Modra  ---
Fixed mainline.  Probably best not to backport since this is necessarily an ABI
change.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2016-11-22 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08dc996fedde9143cda25720961684087b133640

commit 08dc996fedde9143cda25720961684087b133640
Author: Alan Modra 
Date:   Tue Nov 22 18:45:29 2016 +1030

PR20744, Incorrect PowerPC VLE relocs

VLE 16A and 16D relocs were functionally swapped.

PR 20744
include/
* opcode/ppc.h: Define VLE insns using 16A and 16D relocs.
bfd/
* elf32-ppc.h (struct ppc_elf_params): Add vle_reloc_fixup field.
* elf32-ppc.c: Include opcode/ppc.h.
(ppc_elf_howto_raw): Correct dst_mask for R_PPC_VLE_LO16A,
R_PPC_VLE_LO16D, R_PPC_VLE_HI16A, R_PPC_VLE_HI16D, R_PPC_VLE_HA16A,
R_PPC_VLE_HA16D, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_LO16D,
R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HI16D,
R_PPC_VLE_SDAREL_HA16A, and R_PPC_VLE_SDAREL_HA16D relocs.
(ppc_elf_link_hash_table_create): Update default_params init.
(ppc_elf_vle_split16): Correct shift and mask.  Add params.
Report or fix insn/reloc mismatches.
(ppc_elf_relocate_section): Pass input_section, offset and fixup
to ppc_elf_vle_split16.
binutils/
* NEWS: Mention PowerPC VLE relocation error.
gas/
* config/tc-ppc.c: Delete VLE insn defines.
(md_assemble): Swap use_a_reloc and use_d_reloc.
* testsuite/gas/ppc/vle-reloc.d: Update.
ld/
* emultempl/ppc32elf.em (params): Update initializer.  Handle
--vle-reloc-fixup command line arg.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2016-11-21 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|amodra at gmail dot com|
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/20744] [PPC] Incorrect relocation for VLE-instructions

2016-11-07 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-07
 CC||amodra at gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from Alan Modra  ---
Yes, and ld processes an R_PPC_VLE_HA16D reloc as if it were an R_PPC_VLE_HA16A
reloc and vice-versa.  So fixing this bug means we break object file
compatibility.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils