Re: readelf patch

2015-10-27 Thread Nick Clifton

Hi Stephen,


Here is a patch to add support to readelf for showing the details of two
more types of NetBSD ELF notes.  The patches are taken from the cvs repo
of NetBSD, where the changes were applied to their copy a while back.


Do you have a binutils FSF copyright assignment on file ?  (I looked but 
did not find one).  Without it then we normally cannot accept patches 
like this.


In this particular case however I have accepted the patch, because I 
feel that it counts as "obvious".  So the patch is now in, along with 
these changelog entries:


Cheers
  Nick


binutils/ChangeLog
2015-10-27  Stephen Fisher  

* binutils.c (process_netbsd_elf_note): New function.
(process_note): Call the new function for NetBSD core notes.

include/elf/ChangeLog
2015-10-27  Stephen Fisher  

* common.h (NT_NETBSD_MARCH): Define.


___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19157] GNURL78 "Objdump": Incorrect disassembler output generated by objdump for base addressing using SP register.

2015-10-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19157

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit 02f12cd4669463a1b2346145808213adeb303e2d
Author: Vinay Kumar 
Date:   Tue Oct 27 14:00:40 2015 +

Fix RL78 disassembly so that SP+OFFSET addressing always shows the offset,
even when zero.

PR binutils/19157
opcodes * rl78-decode.opc: Add 'a' print operator to mov instructions
using stack pointer plus index addressing.
* rl78-decode.c: Regenerate.

tests   * gas/rl78: New directory.
* gas/rl78/rl78.exp: New test driver.
* gas/rl78/pr19157.s: New test source file.
* gas/rl78/pr19157.d: New test case.

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


Re: readelf patch

2015-10-27 Thread Stephen Fisher
On Tue, Oct 27, 2015 at 11:36:34AM +, Nick Clifton wrote:

> >Here is a patch to add support to readelf for showing the details of 
> >two more types of NetBSD ELF notes.  The patches are taken from the 
> >cvs repo of NetBSD, where the changes were applied to their copy a 
> >while back.
> 
> Do you have a binutils FSF copyright assignment on file ?  (I looked 
> but did not find one).  Without it then we normally cannot accept 
> patches like this.

I do not.  I didn't write the original code, someone in the NetBSD 
project did and put it in their cvs repository.  If that's a problem, 
I'd be happy to re-write it (I wrote my own until I realized NetBSD had 
implemented the feature already) and sign a copyright assignment.

> In this particular case however I have accepted the patch, because I 
> feel that it counts as "obvious".  So the patch is now in, along with 
> these changelog entries:

Thanks!

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19159] GNURL78:Incorrect disassembler output generated by objdump for base addressing using DE register.

2015-10-27 Thread vinay.g at kpit dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19159

--- Comment #2 from vinay kumar  ---
Created attachment 8753
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8753&action=edit
Updated patch with "ChangeLog" comments.

Updated patch with "ChangeLog" comments. 
Also binutils mailing list link is provided for reference 
https://sourceware.org/ml/binutils/2015-06/msg00261.html

-- 
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 binutils/19158] GNURL78: Incorrect disassembler output generated by objdump for SFR registers.

2015-10-27 Thread vinay.g at kpit dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19158

--- Comment #3 from vinay kumar  ---
Mailing list link for reference :
https://sourceware.org/ml/binutils/2015-07/msg00044.html

-- 
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 binutils/19158] GNURL78: Incorrect disassembler output generated by objdump for SFR registers.

2015-10-27 Thread vinay.g at kpit dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19158

--- Comment #2 from vinay kumar  ---
Created attachment 8752
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8752&action=edit
Updated patch with "ChangeLog" content.

Patch is updated with change log related comments.

-- 
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 binutils/19157] GNURL78 "Objdump": Incorrect disassembler output generated by objdump for base addressing using SP register.

2015-10-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19157

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #3 from Nick Clifton  ---
Hi Vinay,

  Thanks for the bug report and patch.  I have checked the patch in, but in the
future please could you include a ChangeLog entry to go along with the patch,
and if possible a testcase to check the patch.

  I was somewhat surprised to discover that we do not have any RL78 specific
gas tests, so I have taken the liberty of creating a new directory in the
testsuite and adding a test for this PR.  I hope that over time people will add
more RL78 tests to this directory.  (Hint hint... :-)

Cheers
  Nick

-- 
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 binutils/19158] GNURL78: Incorrect disassembler output generated by objdump for SFR registers.

2015-10-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19158

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit 4666280441d1a8d3479d45f1ec5b67cf83d58f35
Author: Vinay Kumar 
Date:   Tue Oct 27 14:49:02 2015 +

Display system registers by their names when disassembling RL78
instructions.

PR binutils/19158
opcodes * rl78-decode.opc: Add 's' print operator to instructions that
access system registers.
* rl78-decode.c: Regenerate.
* rl78-dis.c (print_insn_rl78_common): Decode all system
registers.

tests   * gas/rl78/pr19158.s: New test source file.
* gas/rl78/pr19158.d: New test case.
* gas/rl78/rl78.exp: Run the new test.

-- 
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 binutils/19158] GNURL78: Incorrect disassembler output generated by objdump for SFR registers.

2015-10-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19158

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #5 from Nick Clifton  ---
Hi Vinay,

  Thanks - I have checked the patch in, along with a new testcase and some
changelog entries.

Cheers
  Nick

-- 
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 binutils/19159] GNURL78:Incorrect disassembler output generated by objdump for base addressing using DE register.

2015-10-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19159

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

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

commit c2f2875869a3e427435ea04bcd416ee2f99e7ee9
Author: Vinay Kumar 
Date:   Tue Oct 27 15:24:40 2015 +

Fix RL78 disassembly of DE+offset addressing to always show the offset,
even when zero.

PR binutils/19159
opcodes * rl78-decode.opc (MOV): Added offset to DE register in index
addressing mode.
* rl78-decode.c: Regenerate.

test* gas/rl78/pr19159.s: New test source file.
* gas/rl78/pr19159.d: New test case.
* gas/rl78/rl78.exp: Run the new test.

-- 
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 binutils/19159] GNURL78:Incorrect disassembler output generated by objdump for base addressing using DE register.

2015-10-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19159

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #4 from Nick Clifton  ---
Hi Vinay,

  Thanks for the updated patch and changelog - I have now checked them in.

Cheers
  Nick

-- 
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 gold/19042] unsupported reloc 311/312

2015-10-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19042

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Han Shen :

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

commit 4d2f5d5824be99326c2c3e459c298e338856d8c8
Author: Han Shen 
Date:   Tue Oct 27 15:17:54 2015 -0700

Patch for PR gold/19042 - unsupported reloc 311/312.

gold/

* aarch64.cc (Target_aarch64::Scan::local): Add support for
reloc 311/312.

-- 
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 gold/19177] New: gold doesn't handle R_386_GOT32X relocation without base register

2015-10-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19177

Bug ID: 19177
   Summary: gold doesn't handle R_386_GOT32X relocation without
base register
   Product: binutils
   Version: 2.26 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: hjl.tools at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

The new R_386_GOT32X relocation can have no base register:

movlbar@GOT, %eax

Its calculation is G + A, instead of G + A - GOT, and it can
only used to generate non-PIC executable:

https://github.com/hjl-tools/x86-psABI/wiki/intel386-psABI-20151021.pdf

[hjl@gnu-tools-1 gold]$ cat x.S
.text
movlbar@GOT, %eax
[hjl@gnu-tools-1 gold]$ cat y.S
.data
.globl  bar
.type   bar, @object
bar:
.byte   1
[hjl@gnu-tools-1 gold]$ make
gcc -m32 -c -o x.o x.S
gcc -m32 -c -o y.o y.S
ld.bfd -m elf_i386 -o liby.so -shared y.o
ld.bfd -m elf_i386 -o x x.o liby.so
ld.bfd: warning: cannot find entry symbol _start; defaulting to
08048190
objdump -dwr x.o

x.o: file format elf32-i386


Disassembly of section .text:

 <.text>:
   0:   8b 05 00 00 00 00   mov0x0,%eax 2: R_386_GOT32X bar
objdump -dwr x

x: file format elf32-i386


Disassembly of section .text:

08048190 <.text>:
 8048190:   8b 05 18 92 04 08   mov0x8049218,%eax
readelf -SW x | grep ".\got "
  [ 9] .got  PROGBITS08049218 000218 04 04  WA  0   0 
4
[hjl@gnu-tools-1 gold]$ make libx.so
ld.bfd -m elf_i386 -o libx.so -shared x.o
ld.bfd: x.o: direct GOT relocation R_386_GOT32X against `bar' without base
register can not be used when making a shared object
ld.bfd: failed to set dynamic section sizes: File format not recognized
Makefile:18: recipe for target 'libx.so' failed
make: *** [libx.so] Error 1

Gold doesn't handle it properly:

[hjl@gnu-tools-1 gold]$ make LD=ld.gold 
gcc -m32 -c -o x.o x.S
gcc -m32 -c -o y.o y.S
ld.gold -m elf_i386 -o liby.so -shared y.o
ld.gold -m elf_i386 -o x x.o liby.so
objdump -dwr x.o

x.o: file format elf32-i386


Disassembly of section .text:

 <.text>:
   0:   8b 05 00 00 00 00   mov0x0,%eax 2: R_386_GOT32X bar
objdump -dwr x

x: file format elf32-i386


Disassembly of section .text:

08048190 <.text>:
 8048190:   8b 05 fc ff ff ff   mov0xfffc,%eax
readelf -SW x | grep ".\got "
  [ 8] .got  PROGBITS08049220 000220 04 00  WA  0   0 
4
[hjl@gnu-tools-1 gold]$ make LD=ld.gold  libx.so
ld.gold -m elf_i386 -o libx.so -shared x.o
[hjl@gnu-tools-1 gold]$

-- 
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 ld/19162] Huge binary after linking sections with "a" and "wa" flags

2015-10-27 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19162

Alan Modra  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||amodra at gmail dot com
 Resolution|WONTFIX |---
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #2 from Alan Modra  ---
There is a real problem here.  It is that orphan sections are placed according
to the flags of the first input section encountered, not according to the
resultant output section flags.

Try "ld -shared t2.o t1.o" to see.

-- 
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 ld/19162] Huge binary after linking sections with "a" and "wa" flags

2015-10-27 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19162

Alan Modra  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED
 CC|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