This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold commit] PR 20976: Fix forced allocation of common (-d) during -r links


If the .bss section has other data in it besides common allocations,
gold was subtracting the wrong section start address from the symbol
value.

This PR should win a prize for shortest reproducer ever! Viz:

int a = 0; int b;

-cary


2016-12-19  Cary Coutant  <ccoutant@gmail.com>

gold/
        PR gold/20976
        * 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]