[Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime

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

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Alan Modra  ---
I deliberately left the arm FAILs showing.  They are telling you that -z relro
does not wotk on those target variants.  That should probably be fixed.

-- 
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/21054] [MIPS] Forced local symbol rearranging messes up GOT

2017-01-23 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21054

Cary Coutant  changed:

   What|Removed |Added

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

--- Comment #5 from Cary Coutant  ---
Fixed on trunk and for binutils 2.28.

-- 
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/21054] [MIPS] Forced local symbol rearranging messes up GOT

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21054

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Cary Coutant
:

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

commit 961798ea2ba2f41892ece3695e681bf71df08eba
Author: Vladimir Radosavljevic 
Date:   Mon Jan 23 17:12:10 2017 -0800

Fix MIPS GOT when global symbols are forced to local visibility.

gold/
PR gold/21054
* mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
to the dynamic symbol table if it is forced to local visibility.
(Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
dynamic symbol table if it is forced to local visibility.

-- 
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/21054] [MIPS] Forced local symbol rearranging messes up GOT

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21054

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

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

commit c1f59f8ff9462ce45a3287ea06382a97e561fed3
Author: Vladimir Radosavljevic 
Date:   Mon Jan 23 17:12:10 2017 -0800

Fix MIPS GOT when global symbols are forced to local visibility.

gold/
PR gold/21054
* mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
to the dynamic symbol table if it is forced to local visibility.
(Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
dynamic symbol table if it is forced to local visibility.

-- 
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/21074] [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

--- Comment #5 from Cary Coutant  ---
(In reply to Matthias Klose from comment #2)
> test case from the package at
> https://people.debian.org/~doko/tmp/tst-21074.tar.xz

Something is missing from this test case, I think. It links fine with gold, and
no duplicate symbols are generated. In the problem description, your
__bss_start symbols have a Qt_5 version on them, but when I link your test
case, I don't see any versions on those symbols. It's probable that versions
are the root cause of the problem you're seeing, but I'll need to reproduce the
problem to debug it. I'll try to come up with a small test case on my own, but
if you can figure out what's missing from this one, it would help.

-- 
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/21074] [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

Cary Coutant  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from Cary Coutant  ---
>   As for what to do about the problem, I am still pondering.  The ELF spec
> says:
> 
>"When the link editor combines several relocatable object files,
> it does not allow multiple definitions of STB_GLOBAL symbols with 
> the same name."
> 
>   But, in this particular case what we really have is a repeated definition
> of the same symbol.  It would be much cleaner, IMHO, if GOLD did not create
> them in the first place.  But this might be hard to achieve.  (I am not a
> GOLD expert).  So maybe the bfd linker would be better off just filtering
> out duplicate symbols.  Hence the desire for a test case to help examine the
> situation.

Gold should clearly not be generating the duplicate symbols, so I don't think
you should change ld to accept them.

However, note that the commit identified is not the one causing the duplicate
symbols, but simply one that makes them section-relative rather than absolute.
Apparently, ld is fine with duplicate absolute symbols, but it's not fine with
duplicate relative symbols. Seems to me you should fix ld so it does diagnose
the duplicate symbols in the absolute case. It should at least be consistent.

-- 
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/21076] New: (cygwin) Output DLL import lookup/address tables are incorrect

2017-01-23 Thread afranchuk at lgsinnovations dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21076

Bug ID: 21076
   Summary: (cygwin) Output DLL import lookup/address tables are
incorrect
   Product: binutils
   Version: 2.27
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: afranchuk at lgsinnovations dot com
  Target Milestone: ---

I have a large chunk of code (some of which is large enough that the PE big-obj
format must be used) that is being linked into a DLL by binutils-2.27 in a
Cygwin 64-bit environment. I built the binutils myself, as the binutils
currently distributed by Cygwin is too old and does not support the big-obj
format.

The linking executes and completes okay, however the DLL fails to be loaded,
with a missing dependency that cannot be resolved. Looking at the import tables
using Dependency Walker (or just objdump -p), I see that a dependency that is
marked as being in one DLL is "leaking" into being marked as needed in another.
In other words, the import table says that a symbol "myfunc" is in BOTH "a.dll"
and "b.dll", when it is supposed to only be in "b.dll". I used hexdump to view
the raw linked DLL and, using the PE specification as a guide, found that the
empty (NULL) entry that is supposed to signify the end of the import
lookup/address table is being overwritten for "a.dll". So the dependencies for
"b.dll" (in this example, a symbol called "myfunc") are overwritting the NULL
terminating entry of the previous DLL ("a.dll"), so that from the parsing of
the PE format "myfunc" appears to be in the lookup table and address table for
"a.dll", and then also (and correctly) in that of "b.dll".

I cannot share the reproducing code, and this is the first time this has
occurred. I have linked many other large code bases into DLLs and executables
without this occurring, and other DLL references in the import lookup table of
the DLL I'm linking do not exhibit this issue. This issue IS in both the import
lookup table (.idata$4) and the import address table (.idata$5).

I have spent a good few hours already trying to find the source of the bug in
the ld/bfd source code, but haven't found it yet (part of those hours was
getting familiar with the program flow, though).

Any help would be greatly appreciated!

-- 
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/21074] [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

--- Comment #2 from Matthias Klose  ---
test case from the package at
https://people.debian.org/~doko/tmp/tst-21074.tar.xz

-- 
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/21074] [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

--- Comment #3 from Matthias Klose  ---
and tested that with a binutils with the problematic revision reverted, and
rebuilt qt libraries lets the link succeed again.

-- 
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/21074] [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

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

  Would it be possible for you to upload a small test case that reproduces this
problem.  Ideally involving just object files and test libraries so that no
compilation or system libraries are involved ?

  As for what to do about the problem, I am still pondering.  The ELF spec
says:

   "When the link editor combines several relocatable object files,
it does not allow multiple definitions of STB_GLOBAL symbols with 
the same name."

  But, in this particular case what we really have is a repeated definition of
the same symbol.  It would be much cleaner, IMHO, if GOLD did not create them
in the first place.  But this might be hard to achieve.  (I am not a GOLD
expert).  So maybe the bfd linker would be better off just filtering out
duplicate symbols.  Hence the desire for a test case to help examine the
situation.

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 gas/21072] Typos in translatable and untranslatable strings

2017-01-23 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21072

Nick Clifton  changed:

   What|Removed |Added

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

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

  Thanks for the bug report and patches.  I have checked the patches in, but I
have omitted the changes that reduce the spacing between sentences.  Having two
spaces after a period is perfectly acceptable and does not need to be changed.

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 gas/21072] Typos in translatable and untranslatable strings

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21072

--- 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=33eaf5de31b248f84ae108cf0cf4e1664db9ee51

commit 33eaf5de31b248f84ae108cf0cf4e1664db9ee51
Author: Nick Clifton 
Date:   Mon Jan 23 15:23:07 2017 +

Fix spelling mistakes and typos in the GAS sources.

PR gas/21072
* asintl.h: Fix spelling mistakes and typos.
* atof-generic.c: Likewise.
* bit_fix.h: Likewise.
* config/atof-ieee.c: Likewise.
* config/bfin-defs.h: Likewise.
* config/bfin-parse.y: Likewise.
* config/obj-coff-seh.h: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-evax.c: Likewise.
* config/obj-macho.c: Likewise.
* config/rx-parse.y: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-bfin.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-crx.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-epiphany.c: Likewise.
* config/tc-frv.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i386-intel.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mep.c: Likewise.
* config/tc-mep.h: Likewise.
* config/tc-metag.c: Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-msp430.h: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-nds32.h: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-nios2.h: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-pdp11.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-pru.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-score.c: Likewise.
* config/tc-score7.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh64.c: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-visium.c: Likewise.
* config/tc-xgate.c: Likewise.
* config/tc-xtensa.c: Likewise.
* config/tc-z80.c: Likewise.
* config/tc-z8k.c: Likewise.
* config/te-vms.c: Likewise.
* config/xtensa-relax.c: Likewise.
* doc/as.texinfo: Likewise.
* doc/c-arm.texi: Likewise.
* doc/c-hppa.texi: Likewise.
* doc/c-i370.texi: Likewise.
* doc/c-i386.texi: Likewise.
* doc/c-m32r.texi: Likewise.
* doc/c-m68k.texi: Likewise.
* doc/c-mmix.texi: Likewise.
* doc/c-msp430.texi: Likewise.
* doc/c-nds32.texi: Likewise.
* doc/c-ns32k.texi: Likewise.
* doc/c-riscv.texi: Likewise.
* doc/c-rx.texi: Likewise.
* doc/c-s390.texi: Likewise.
* doc/c-tic6x.texi: Likewise.
* doc/c-tilegx.texi: Likewise.
* doc/c-tilepro.texi: Likewise.
* doc/c-v850.texi: Likewise.
* doc/c-xgate.texi: Likewise.
* doc/c-xtensa.texi: Likewise.
* dwarf2dbg.c: Likewise.
* ecoff.c: Likewise.
* itbl-ops.c: Likewise.
* listing.c: Likewise.
* macro.c: Likewise.
* po/gas.pot: Likewise.
* read.c: Likewise.
* struc-symbol.h: Likewise.
* symbols.h: Likewise.
* testsuite/gas/arc/relocs-errors.err: Likewise.
* write.c: 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 gold/21074] New: [2.28 Regression] bfd ld stumbles over duplicated symbols generated by gold

2017-01-23 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=21074

Bug ID: 21074
   Summary: [2.28 Regression] bfd ld stumbles over duplicated
symbols generated by gold
   Product: binutils
   Version: 2.28
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: doko at debian dot org
CC: ian at airs dot com
  Target Milestone: ---

[forwarded from https://bugs.debian.org/852035]

"""
When the gold linker is used, it sometimes generates duplicated symbols.
It's not something new, and can be seen for example in
qtbase-opensource-src 5.7.1+dfsg-2:

  1081: 004caf88 0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5
  1082: 004caf88 0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5

Note that bfd doesn't generate duplicated with the same command line
beside the -fuse-ld=gold. This used to not be a problem with both gold
and bfd. However the upstream commit eb3908448b , which first appeared
in binutils 2.27.51.20161231-1, causes this symbols to become
relocatable. This can be seen in qtbase-opensource-src 5.7.1+dfsg-3:

  1081: 004caf88 0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5
  1082: 004caf88 0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5

This in turn causes bfd to fail to link binaries against libQt5Core.so
or libQt5Gui.so, for example when building libqapt (see [1] for a full
build log):

  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition
of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition
of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition
of `_end'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `_end'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple
definition of `_end'

Note however that having duplicated symbols doesn't cause a problem to
gold, only to bfd.

I don't really know how this should be fixed, either bfd should accept
duplicated symbols, or gold should stop generating them.
"""

-- 
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/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #22 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=fda46c417ff8324960ca305141df5fc6c2f580af

commit fda46c417ff8324960ca305141df5fc6c2f580af
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:19:46 2017 +

PR ld/20828: Remove leading `_' from symbols used in tests

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and remove the leading underscore
from `_fdata' and `_edata' symbols used in tests, fixing a:

FAIL: PR ld/20828 dynamic symbols with section GC (version script)

failure with targets such as: `bfin-elf', `bfin-uclinux', `metag-elf',
`metag-linux' `mn10300-elf', `sh-elf', `sh64-elf', and possibly other
ones, that have `_' set (with `elf_symbol_leading_char') as the leading
character for symbols.  As from commit 93252b1cf41a ("bfd/ld: handle ABI
prefixes in version scripts") these targets strip the leading underscore
before applying version script rules, because the (default) syntax for
symbol names is that of the C language rather than their low-level
symbol table encoding.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to
`fdata' and `edata' respectively.
* testsuite/ld-elf/pr20828.ver: Adjust accordingly.
* testsuite/ld-elf/pr20828-a.sd: Likewise.
* testsuite/ld-elf/pr20828-b.sd: Likewise.
* testsuite/ld-elf/pr20828-c.sd: 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 ld/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #26 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Maciej W. Rozycki
:

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

commit f1e1be692fded333465d71ace0347db736ecc441
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:21:19 2017 +

PR ld/20828: Work around RISC-V failures

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and add `.plt' to the list of
output sections created, fixing:

FAIL: PR ld/20828 dynamic symbols with section GC (auxiliary shared
library)
FAIL: PR ld/20828 dynamic symbols with section GC (plain)
FAIL: PR ld/20828 dynamic symbols with section GC (version script)

failures with `riscv32-elf', `riscv32-linux', `riscv64-elf' and
`riscv64-linux' targets caused by LD crashing in the absence of such a
section.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828.ld: Add `.plt'.

(cherry picked from commit 1e5f45bb15d287ed763b7b638254424149040f7a)

-- 
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/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #25 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Maciej W. Rozycki
:

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

commit b70d100fc1c5a130c3fe9387be83b7927e2025fb
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:19:46 2017 +

PR ld/20828: Remove leading `_' from symbols used in tests

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and remove the leading underscore
from `_fdata' and `_edata' symbols used in tests, fixing a:

FAIL: PR ld/20828 dynamic symbols with section GC (version script)

failure with targets such as: `bfin-elf', `bfin-uclinux', `metag-elf',
`metag-linux' `mn10300-elf', `sh-elf', `sh64-elf', and possibly other
ones, that have `_' set (with `elf_symbol_leading_char') as the leading
character for symbols.  As from commit 93252b1cf41a ("bfd/ld: handle ABI
prefixes in version scripts") these targets strip the leading underscore
before applying version script rules, because the (default) syntax for
symbol names is that of the C language rather than their low-level
symbol table encoding.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to
`fdata' and `edata' respectively.
* testsuite/ld-elf/pr20828.ver: Adjust accordingly.
* testsuite/ld-elf/pr20828-a.sd: Likewise.
* testsuite/ld-elf/pr20828-b.sd: Likewise.
* testsuite/ld-elf/pr20828-c.sd: Likewise.

(cherry picked from commit fda46c417ff8324960ca305141df5fc6c2f580af)

-- 
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/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #24 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Maciej W. Rozycki
:

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

commit 7d9468120fceed20240511404e6d9498e68f3dc6
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:18:33 2017 +

PR ld/20828: Relax symbol ordering in tests

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and make tests check for the
presence of global `_fdata' and `_edata' symbols separately, removing
any dependency on symbol table ordering for tests to succeed and
removing:

FAIL: PR ld/20828 dynamic symbols with section GC (auxiliary shared
library)
FAIL: PR ld/20828 dynamic symbols with section GC (plain)

failures with the `x86_64-solaris2' target, which has additional
intervening entries:

Symbol table '.dynsym' contains 6 entries:
   Num:Value  Size TypeBind   Vis  Ndx Name
 0:  0 NOTYPE  LOCAL  DEFAULT  UND
 1:  0 NOTYPE  GLOBAL DEFAULT1 _fdata
 2:  0 OBJECT  GLOBAL DEFAULT1 _DYNAMIC
 3:  0 OBJECT  GLOBAL DEFAULT  ABS
_PROCEDURE_LINKAGE_TABLE_
 4:  0 NOTYPE  GLOBAL DEFAULT1 _edata
 5: 01b8 0 OBJECT  GLOBAL DEFAULT4
_GLOBAL_OFFSET_TABLE_

Rename dump pattern files accordingly for consistency.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828-1.sd: Remove test.
* testsuite/ld-elf/pr20828-a.sd: New test.
* testsuite/ld-elf/pr20828-2a.sd: Rename test to...
* testsuite/ld-elf/pr20828-b.sd: ... this.
* testsuite/ld-elf/pr20828-2b.sd: Rename test to...
* testsuite/ld-elf/pr20828-c.sd: ... this.
* testsuite/ld-elf/shared.exp: Adjust accordingly.

(cherry picked from commit adcbdc63e5ccf663dacc8493cec63a95b653285e)

-- 
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/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #22 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=fda46c417ff8324960ca305141df5fc6c2f580af

commit fda46c417ff8324960ca305141df5fc6c2f580af
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:19:46 2017 +

PR ld/20828: Remove leading `_' from symbols used in tests

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and remove the leading underscore
from `_fdata' and `_edata' symbols used in tests, fixing a:

FAIL: PR ld/20828 dynamic symbols with section GC (version script)

failure with targets such as: `bfin-elf', `bfin-uclinux', `metag-elf',
`metag-linux' `mn10300-elf', `sh-elf', `sh64-elf', and possibly other
ones, that have `_' set (with `elf_symbol_leading_char') as the leading
character for symbols.  As from commit 93252b1cf41a ("bfd/ld: handle ABI
prefixes in version scripts") these targets strip the leading underscore
before applying version script rules, because the (default) syntax for
symbol names is that of the C language rather than their low-level
symbol table encoding.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to
`fdata' and `edata' respectively.
* testsuite/ld-elf/pr20828.ver: Adjust accordingly.
* testsuite/ld-elf/pr20828-a.sd: Likewise.
* testsuite/ld-elf/pr20828-b.sd: Likewise.
* testsuite/ld-elf/pr20828-c.sd: 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 ld/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #23 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=1e5f45bb15d287ed763b7b638254424149040f7a

commit 1e5f45bb15d287ed763b7b638254424149040f7a
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:21:19 2017 +

PR ld/20828: Work around RISC-V failures

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and add `.plt' to the list of
output sections created, fixing:

FAIL: PR ld/20828 dynamic symbols with section GC (auxiliary shared
library)
FAIL: PR ld/20828 dynamic symbols with section GC (plain)
FAIL: PR ld/20828 dynamic symbols with section GC (version script)

failures with `riscv32-elf', `riscv32-linux', `riscv64-elf' and
`riscv64-linux' targets caused by LD crashing in the absence of such a
section.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828.ld: Add `.plt'.

-- 
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/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local

2017-01-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20828

--- Comment #21 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=adcbdc63e5ccf663dacc8493cec63a95b653285e

commit adcbdc63e5ccf663dacc8493cec63a95b653285e
Author: Maciej W. Rozycki 
Date:   Mon Jan 23 11:18:33 2017 +

PR ld/20828: Relax symbol ordering in tests

Complement commit 81ff47b3a546 ("PR ld/20828: Fix linker script symbols
wrongly forced local with section GC") and make tests check for the
presence of global `_fdata' and `_edata' symbols separately, removing
any dependency on symbol table ordering for tests to succeed and
removing:

FAIL: PR ld/20828 dynamic symbols with section GC (auxiliary shared
library)
FAIL: PR ld/20828 dynamic symbols with section GC (plain)

failures with the `x86_64-solaris2' target, which has additional
intervening entries:

Symbol table '.dynsym' contains 6 entries:
   Num:Value  Size TypeBind   Vis  Ndx Name
 0:  0 NOTYPE  LOCAL  DEFAULT  UND
 1:  0 NOTYPE  GLOBAL DEFAULT1 _fdata
 2:  0 OBJECT  GLOBAL DEFAULT1 _DYNAMIC
 3:  0 OBJECT  GLOBAL DEFAULT  ABS
_PROCEDURE_LINKAGE_TABLE_
 4:  0 NOTYPE  GLOBAL DEFAULT1 _edata
 5: 01b8 0 OBJECT  GLOBAL DEFAULT4
_GLOBAL_OFFSET_TABLE_

Rename dump pattern files accordingly for consistency.

ld/
PR ld/20828
* testsuite/ld-elf/pr20828-1.sd: Remove test.
* testsuite/ld-elf/pr20828-a.sd: New test.
* testsuite/ld-elf/pr20828-2a.sd: Rename test to...
* testsuite/ld-elf/pr20828-b.sd: ... this.
* testsuite/ld-elf/pr20828-2b.sd: Rename test to...
* testsuite/ld-elf/pr20828-c.sd: ... this.
* testsuite/ld-elf/shared.exp: Adjust accordingly.

-- 
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/20995] Read-only data in ELF libraries may be remapped writable at runtime

2017-01-23 Thread clyon at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20995

Christophe Lyon  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #10 from Christophe Lyon  ---
As I reported on the mailing-list, 2 of the new tests fail on arm-netbsdelf and
arm-none-eabi:
FAIL: Build pr20995-2.so
FAIL: pr20995-2

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