[Bug ld/22758] FAIL: Run pr22393-2

2018-01-29 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

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 ld/22758] FAIL: Run pr22393-2

2018-01-29 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #4 from Alan Modra  ---
Here are pr22393-2 program headers and section to header mapping:

  PHDR   0x34 0x00010034 0x00010034 0x00140 0x00140 R   0x4
  INTERP 0x000174 0x00010174 0x00010174 0xd 0xd R   0x1
  [Requesting program interpreter: /lib/ld.so.1]
  LOAD   0x00 0x0001 0x0001 0x0043c 0x0043c R   0x1000
  LOAD   0x001000 0x00011000 0x00011000 0x00554 0x00554 R E 0x1000
  LOAD   0x002000 0x00012000 0x00012000 0x00118 0x00118 R   0x1000
  LOAD   0x003000 0x00013000 0x00013000 0x000f8 0x000f8 RW  0x1000
  LOAD   0x0040f8 0x000130f8 0x000130f8 0x00064 0x00064 RWE 0x1000
  LOAD   0x00515c 0x0001315c 0x0001315c 0x0001c 0x0002c RW  0x1000
  DYNAMIC0x003020 0x00013020 0x00013020 0x000d0 0x000d0 RW  0x4
  NOTE   0x000184 0x00010184 0x00010184 0x00044 0x00044 R   0x4

   00 
   01 .interp 
   02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym
.dynstr .gnu.version .gnu.version_r .rela.plt 
   03 .init .text .fini 
   04 .rodata .PARISC.unwind .eh_frame 
   05 .init_array .ctors .dtors .data.rel.ro .dynamic .data 
   06 .plt 
   07 .got .bss 
   08 .dynamic 
   09 .note.ABI-tag .note.gnu.build-id 

There's a problem with the last 3 PT_LOAD headers.  They can't be mapped from
different disk pages (0x3000, 0x4000 and 0x5000) into the same memory page
(0x13000).

-- 
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/22756] Linker relaxation miscalculates symbol addresses on riscv

2018-01-29 Thread wilson at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22756

Jim Wilson  changed:

   What|Removed |Added

 CC||wilson at gcc dot gnu.org

--- Comment #1 from Jim Wilson  ---
The function size is wrong too.

The function address/size is modified in riscv_relax_delete_bytes in
elfnn-riscv.c.  This goes through the symbol table, and looks for any symbol
whose address/size if affected by the deleted bytes, and then adjusts the
symbol address/size by the deleted byte count.

The problem here is that for part of the link, for __wrap_exit, we have two
identical symbols with the same address and size.  Hence, when we adjust
symbols, we adjust __wrap_exit twice, causing us to delete too much from both
its address and size.

I don't know why we have two identical symbols yet, I will be looking at that
next.

-- 
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/22649] -gc-sections preserves hidden symbols that are also visible in dynamic objects

2018-01-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22649

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

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

commit af667f2218ecf772ac2f8882ceba6a16ddc18ddc
Author: Maciej W. Rozycki 
Date:   Tue Jan 30 01:31:23 2018 +

MIPS/LD/testsuite: Correct PR ld/22649 test case failures

Fix commit d664fd41e15f ("Ignore dynamic references on forced local
symbols") and use alternative test actions and match patterns to
correctly handle messages like:

.../ld/ld-new: Removing unused section '.reginfo' in file
'tmpdir/pr22649-2b.o'

or:

.../ld/ld-new: Removing unused section '.MIPS.options' in file
'tmpdir/pr22649-2b.o'

produced by LD on MIPS targets, removing:

FAIL: Build pr22649-2c.so
FAIL: Build pr22649-2d.so

test suite failures and tightening checks made with `pr22649-2a.so' and
`pr22649-2b.so' test cases.

Keep the original empty action with `pr22649-2c.so' and `pr22649-2d.so'
links and MIPS/ELF targets though, because for them the linker does not
garbage-collect the `.reginfo' section.  This is because the section has
its flags set differently by code in GAS in `md_begin':

if (strncmp (TARGET_OS, "elf", 3) != 0)
  flags |= SEC_ALLOC | SEC_LOAD;

and consequently BFD linker code in `_bfd_elf_gc_mark_extra_sections':

  else if (((isec->flags & SEC_DEBUGGING) != 0
|| (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
   && elf_next_in_group (isec) == NULL)
isec->gc_mark = 1;

marks these sections to be kept due to their SEC_ALLOC, SEC_LOAD and
SEC_RELOC flags all being zero (`.reginfo' sections never have
relocations attached).

ld/
PR ld/22649
* testsuite/ld-elf/pr22649-2ab-mips.msg: New stderr output.
* testsuite/ld-elf/pr22649-2cd-mips.msg: New stderr output.
* testsuite/ld-elf/shared.exp: Use the new outputs with
`mips*-*-*' targets.

-- 
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/21703] The first symbol definition is overwritten by second definition when --allow-multiple-definition is provieded

2018-01-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21703

--- Comment #11 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Maciej W. Rozycki :

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

commit 822520337789f93b528fe0babc7dcfb03bb50fcd
Author: Maciej W. Rozycki 
Date:   Tue Jan 30 00:38:12 2018 +

MIPS/LD/testsuite: Adjust match patterns for special section indexes

Update `readelf' symbol table dump match patterns to handle SHN_MIPS_DATA
and SHN_MIPS_TEXT special section indexes produced by the IRIX ELF format
variation used with a number of MIPS targets and printed by `readelf' as
PRC[0xff02] and PRC[0xff01] respectively, correcting LD test suite
failures:

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^
+[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: Common symbol override test (auxiliary shared object build)

extra regexps in .../ld/testsuite/ld-elf/pr21703-shared.sd starting with "^
+[0-9]+: +[0-9a-f]+ +4 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@FOO$"
EOF from dump.out
FAIL: PR ld/21703 shared

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^
+[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: MIPS o32/copyreloc common symbol override test (auxiliary shared
object build)

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^
+[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: MIPS o32/nocopyreloc common symbol override test (auxiliary shared
object build)

observed due to file contents like:

 7: 5ffe02e8 0 OBJECT  GLOBAL DEFAULT PRC[0xff02] foo

shown by `readelf -s' vs:

 +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo

pattern expected, triggered by widening testing to these targets by commit
05a5feafdd38 ("Rewrite check_shared_lib_support").

ld/
* testsuite/ld-elf/comm-data1.sd: Alternatively accept
`PRC[0xff02]' in place of a regular section index.
* testsuite/ld-elf/pr21703-shared.sd: Likewise `PRC[0xff01]'.

-- 
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/22758] FAIL: Run pr22393-2

2018-01-29 Thread ebotcazou at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org

--- Comment #3 from Eric Botcazou  ---
Let me add that we have the same couple of failures on SPARC64/Linux.

-- 
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/22269] Undefined weak symbols isn't resolved to 0 in static PIE

2018-01-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22269

--- Comment #33 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Eric Botcazou :

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

commit 185cdb8cc7c0102140d41fb6272a5ee4d72d
Author: Eric Botcazou 
Date:   Tue Jan 30 00:21:57 2018 +0100

 Adjust test for PR ld/22269.

 On the SPARC architecture, you need to pass a special flag to GNU as
 when you're assembling PIC/PIE code or else you get a wrong relocation
 for the GOT symbol.

ld/
* testsuite/ld-elf/shared.exp (AFLAGS_PIC): Define on SPARC.
(pr22269-1): Pass AFLAGS_PIC to the assembler.

-- 
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/22738] .dc.a directive has wrong size on SPARC 64-bit

2018-01-29 Thread ebotcazou at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22738

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #4 from Eric Botcazou  ---
Fixed on mainline.

-- 
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/22738] .dc.a directive has wrong size on SPARC 64-bit

2018-01-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22738

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

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

commit d85815e2d16f7c042d7912f1fa85bf1b9c28ca44
Author: Eric Botcazou 
Date:   Tue Jan 30 00:13:51 2018 +0100

Fix PR gas/22738 (.dc.a directive has wrong size on SPARC 64-bit).

The .dc.a directive has wrong size (32 bits) on SPARC 64-bit because
the assembler sets the correct BFD architecture only at the very end
of the processing and it's too late for the directive.  It's fixed by
defining TARGET_MACH and making it return a sensible default value.

gas/
* config/tc-sparc.h (sparc_mach): Declare.
(TARGET_MACH): Define to above.
* config/tc-sparc.c (sparc_mach): New function.
(sparc_md_end): Minor tweak.
ld/
* testsuite/ld-elf/pr22450.d: Remove reference to SPARC64.

-- 
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/22734] nm documentation: misleading information about BSS

2018-01-29 Thread vincent-srcware at vinc17 dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=22734

--- Comment #2 from Vincent Lefèvre  ---
The content seems fine, but there are some typos:
  sytem → system
  zero-initialiszed → zero-initialized

Moreover, I also suppose that "behaviour" should be changed to "behavior" since
this is US English that is currently used.

-- 
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/22734] nm documentation: misleading information about BSS

2018-01-29 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22734

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Created attachment 10761
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10761&action=edit
Proposed patch

Hi Vincent,

  What do you think of this patch ?

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/22758] FAIL: Run pr22393-2

2018-01-29 Thread dave.anglin at bell dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

--- Comment #2 from dave.anglin at bell dot net ---
Hi Nick,

On 2018-01-29 9:18 AM, nickc at redhat dot com wrote:
>Please could you narrow this down to the linker command line and a tarball
>of the object files & libraries involved ?  (I do not have easy access to
>an hppa based build system).
I'll try to look at this as soon as I can.  Alan has an account on a 
hppa-linux system.

Dave

-- 
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/22758] FAIL: Run pr22393-2

2018-01-29 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

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

  Please could you narrow this down to the linker command line and a tarball 
  of the object files & libraries involved ?  (I do not have easy access to
  an hppa based build system).

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/22732] Test failures on targets without support for all-static binaries

2018-01-29 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22732

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.31

--- Comment #2 from H.J. Lu  ---
Fixed for 2.31.

-- 
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/22732] Test failures on targets without support for all-static binaries

2018-01-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22732

--- 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=98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b

commit 98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b
Author: H.J. Lu 
Date:   Mon Jan 29 04:54:57 2018 -0800

ld: Skip unsupported static executable tests

Skip static executable tests if static executable is unsupported.
Tested on Linux/x86 without libc.a.

PR ld/22732
* testsuite/config/default.exp (STATIC_LDFLAGS): New.  Set to
"-static" if target compiler supports it.
* testsuite/ld-bootstrap/bootstrap.exp: Skip static executable
tests if target compiler doesn't support it.
* testsuite/ld-ifunc/ifunc.exp: Likewise.
* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Likewise.
(run_cc_link_tests): 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