[Bug binutils/22465] objcopy interleave fails if section address not multiple of interleave

2017-11-21 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22465

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Hi Jim,

> It is a binutils bug, but I need a linker for the
> testcase, and it appears no binutils tests depend on the linker.

True...

> So it has
> to go in the linker testsuite apparently, but not clear where to put it. 

Probably ld-elf unless it is RISCV specific (which I doubt).  Alternatively
feel free to update the binutils test harness so that it can support using a
linker as part of the test.  This will probably be helpful to other test 
writers in the future.


> Also, not clear how to write it, as the linker testsuite looks complicated.

It depends upon your needs.  A simple, assemble, link, dump,
check-against-regexps type test is straightforward.  Just use rum_dump_test.

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 ld/22471] New: libraries using version scripts can cause undefined reference to symbol '__bss_start'

2017-11-21 Thread james410 at cowgill dot org.uk
https://sourceware.org/bugzilla/show_bug.cgi?id=22471

Bug ID: 22471
   Summary: libraries using version scripts can cause undefined
reference to symbol '__bss_start'
   Product: binutils
   Version: 2.30 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: james410 at cowgill dot org.uk
  Target Milestone: ---

Created attachment 10625
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10625&action=edit
testcase tar.gz

This bug arises when the following occurs:

* An executable which references the __bss_start symbol (from the linker
script)
* links against a library using a version script so that __bss_start is not
exported
* in turn links against another "normal" library which does export __bss_start

I this case ld will complain that the __bss_start symbol is undefined and that
the "normal" library must be linked into the executable directly. I think this
is incorrect and ld should be using the definition of the symbol from the
linker script. Linking the "normal" library manually works around the bug, but
this isn't nice because that library is an implementation detail that the
executable shouldn't need to know about.

The gold linker doesn't seem to be affected (for whatever reason).

I've attached a testcase which illustrates the problem. It was first discovered
while compiling mariadb (specifically mariabackup) on Debian MIPS.

> $ ./build 
> + rm -f null.c
> + touch null.c
> + gcc -c -fPIC consume.c -o consume.o
> + gcc -c -fPIC null.c -o null.o
> + gcc -shared -Wl,--rpath=/user/jcowgill/workspace/binutils/test-bss-start 
> null.o -o libtest.so
> + gcc -shared -Wl,--rpath=/user/jcowgill/workspace/binutils/test-bss-start 
> -Wl,--version-script=middle.ver null.o libtest.so -o libmiddle.so
> + ld --rpath=/user/jcowgill/workspace/binutils/test-bss-start consume.o 
> libmiddle.so -o consume
> ld: consume.o: undefined reference to symbol '__bss_start'
> //user/jcowgill/workspace/binutils/test-bss-start/libtest.so: error adding 
> symbols: DSO missing from command line

-- 
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/22419] binary format generated by LD is incorrect

2017-11-21 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22419

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

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

  OK, so I have gone with the easy fix and banned mixed format links
  for the V850.  So now you have to link and then convert afterwards.
  It keeps things simple, and in my opinion anyway, it is the right
  thing to do.

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 ld/22419] binary format generated by LD is incorrect

2017-11-21 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22419

--- 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=2824e1bd4fc93f112875969b1ba606980aaa55ba

commit 2824e1bd4fc93f112875969b1ba606980aaa55ba
Author: Nick Clifton 
Date:   Tue Nov 21 14:15:51 2017 +

Stop the v850 linker from converting to other output formats whilst
linking.

PR 22419
* emultempl/v850elf.em (v850_create_output_section_statements):
New function.  Generate an error if attempting to convert the
format of the output file.
* testsuite/ld-unique/pr21529.d: Skip for the V850.
* testsuite/ld-elf/pr21884.d: Skip for the V850.

-- 
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/22451] strip no longer works on older object files

2017-11-21 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22451

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit d6251545e230b243abe60e334bb3f78c5e564fa1
Author: H.J. Lu 
Date:   Tue Nov 21 13:41:10 2017 -0800

Add a test for PR binutils/22451

Check in the object file generated from the older assembler as a
compressed file.

PR binutils/22451
* testsuite/binutils-all/x86-64/objects.exp: New file.
* testsuite/binutils-all/x86-64/pr22451.o.bz2: Likewise.

-- 
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/22464] x86 gas -n option does not work

2017-11-21 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22464

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

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

commit 0ad71725d917c51b46ffacbad25744dd889e87da
Author: H.J. Lu 
Date:   Tue Nov 21 16:44:29 2017 -0800

x86: Add tests for -n option of x86 assembler

The -n command-line of x86 assembler disables optimization of alignment
directives, like ".balign 8, 0x90", with multi-byte nop instructions
such as leal 0(%esi),%esi.

PR gas/22464
* testsuite/gas/i386/align-1.s: New file.
* testsuite/gas/i386/align-1a.d: Likewise.
* testsuite/gas/i386/align-1b.d: Likewise.
* testsuite/gas/i386/i386.exp: Run align-1a and align-1b.

-- 
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/22464] x86 gas -n option does not work

2017-11-21 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22464

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
Version|unspecified |2.30 (HEAD)
 Resolution|--- |WORKSFORME
   Target Milestone|--- |2.30

--- Comment #2 from H.J. Lu  ---
(In reply to Jim Wilson from comment #0)
> I noticed this by accident.  The x86 assembler has a -n option which says to
> emit one byte nops instead of multi-byte nops.  But when I try it, it
> doesn't work.
> 
> rohan:2162$ cat tmp.s
>   .text
>   movl%edi, %eax
>   .balign 8
>   movl$0, %edx
>   .balign 8
^^^  This needs to be ".balign 8, 0x90".
>   .section ".text.alt"
>   movl%edi, %eax

I checked in a tesstcase.

-- 
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/22464] x86 gas -n option does not work

2017-11-21 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22464

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools 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