Don't PROVIDE over top of common symbols
authorAlan Modra <amodra@gmail.com>
Mon, 22 Dec 2014 00:19:23 +0000 (10:49 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 23 Dec 2014 13:06:50 +0000 (23:36 +1030)
commit4cc2bf08a4e18aa2009e9d4f1694a800eacbee17
tree8f4ddd987d28c687603ba418ad9129c105313c03
parentcd8e2bcf0d51e91ab8da72ec63048790e3720b03
Don't PROVIDE over top of common symbols

This:
  int end[100000];
  int main(void) { end[99999] = 0; return 0; }
should not segfault.

ld/
* ldexp.c (exp_fold_tree_1 <etree_provide>): Leave bfd_link_hash_common
symbols alone.
ld/testsuite/
* ld-elf/endsym.s, *ld-elf/endsym.d: New test.
ld/ChangeLog
ld/ldexp.c
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/endsym.d [new file with mode: 0644]
ld/testsuite/ld-elf/endsym.s [new file with mode: 0644]