[PATCH] PR gold/16711 Exclude bss from elf when using linker scripts.

Cary Coutant ccoutant@gmail.com
Mon Dec 12 04:47:00 GMT 2016


> 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.
>
> gold/ChangeLog:
>
> 2015-09-17  Johan Karlsson  <johan.karlsson@enea.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.

-cary



More information about the Binutils mailing list