This is the mail archive of the
mailing list for the binutils project.
[gold commit] PR 20976: Fix forced allocation of common (-d) during -r links
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Mon, 19 Dec 2016 10:40:15 -0800
- Subject: [gold commit] PR 20976: Fix forced allocation of common (-d) during -r links
- Authentication-results: sourceware.org; auth=none
If the .bss section has other data in it besides common allocations,
gold was subtracting the wrong section start address from the symbol
This PR should win a prize for shortest reproducer ever! Viz:
int a = 0; int b;
2016-12-19 Cary Coutant <email@example.com>
* symtab.cc (Symbol_table::sized_write_globals): Use address of
output section, not input section.
* testsuite/Makefile.am (pr20976): New test case.
* testsuite/Makefile.in: Regenerate.
* testsuite/pr20976.c: New source file.