This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR gold/16711 Exclude bss from elf when using linker scripts.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Johan Karlsson <Johan dot Karlsson at enea dot com>
- Cc: Binutils <binutils at sourceware dot org>, "iant at google dot com" <iant at google dot com>
- Date: Sun, 11 Dec 2016 20:47:34 -0800
- Subject: Re: [PATCH] PR gold/16711 Exclude bss from elf when using linker scripts.
- Authentication-results: sourceware.org; auth=none
- References: <5006DF1F5103294E8DA02CC4C71B1BF80873BE02@SESTOEX04.enea.se>
> This patch fixes so that NOBITS sections don't take up space in the elf.
> It also fixes so that the program header correctly exclude nobits sections.
> 2015-09-17 Johan Karlsson <email@example.com>
> PR gold/16711
> * output.cc (Output_segment::set_section_list_addresses): Only move
> the file offset for non-NOBITS sections.
> (Output_segment::set_section_addresses): Set memsz based on addresses
> instead of file offsets.
Thanks for the contribution. This is basically the right approach, but
I ended up solving it a bit differently, and had to address a few
additional consequences of the change.