This is the mail archive of the
mailing list for the binutils project.
RE: [PATCH] gold: NOLOAD behavior compatible with GNU ld.
- From: Johan Karlsson <Johan dot Karlsson at enea dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>, "Cary Coutant" <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>, "iant at google dot com" <iant at google dot com>
- Date: Wed, 7 Oct 2015 12:49:47 +0000
- Subject: RE: [PATCH] gold: NOLOAD behavior compatible with GNU ld.
- Authentication-results: sourceware.org; auth=none
- References: <5006DF1F5103294E8DA02CC4C71B1BF80873BF3C at SESTOEX04 dot enea dot se> <CAH9SEo7BgZJLyAGDJjmBxBTYJwwqcaVDts6HHZ+5jF_aez2J=g at mail dot gmail dot com> <CAJimCsGDXs0D9LsV=N=qb6M1iKXW11cY2F9onTD+LE9YVWfNaA at mail dot gmail dot com> <CAH9SEo5aFZ4mQjZExuDQgVNebkex0a_xWsZOon3V=QxKD4hCSg at mail dot gmail dot com>
I don't know how to build the ARM kernel so I would appreciate if someone could try it out using the patch. This patch together with the fix I did for PR 16711 greatly improves the ELF size when using NOLOAD and lots of bss.
> From: Doug Kwan (éæå) [mailto:email@example.com]
> Sent: den 7 oktober 2015 00:26
> Expected behaviour was gold being able to build an ARM kernel that boots.
> The original patch was added because gold had not been able to build the
> kernel used in Android.
> As long as Johan can build an ARM kernel that boots with this patch. I am
> On Tue, Oct 6, 2015 at 3:18 PM, Cary Coutant <firstname.lastname@example.org> wrote:
> > Based on
> > https://sourceware.org/ml/binutils/2010-04/msg00094.html
> > it seems to me that ripping out the original NOLOAD patch would break
> > building the ARM compressed kernel.
> > Doug, do you remember what the expected behavior was at the time?
> > -cary
> > On Sun, Sep 20, 2015 at 12:54 PM, Doug Kwan (éæå)
> <email@example.com> wrote:
> >> Looks good to me. I don't have right to approve the patch though.
> >> On Thu, Sep 17, 2015 at 2:47 AM, Johan Karlsson
> <Johan.Karlsson@enea.com> wrote:
> >>> Hi all,
> >>> This patch makes gold handle the NOLOAD section attribute in the same
> way GNU ld does for elf.
> >>> Instead of creating a SHT_PROGBITS with no flags section it creates one
> with SHT_NOBITS and SHF_ALLOC set. With this change all special handling of
> noload sections can be removed and all NOLOAD sections as handled as
> >>> 2015-09-17 Johan Karlsson <firstname.lastname@example.org>
> >>> NOLOAD section attribute compatible with GNU ld.
> >>> * layout.cc (Layout::choose_output_section): Create NOLOAD
> sections as
> >>> SHT_NOBITS and removed special handling of NOLOAD sections.
> >>> (Layout::make_output_section_for_script): Create NOLOAD as
> >>> with SHF_ALLOC set.
> >>> * output.cc (Output_section::Output_section): Removed member
> >>> (Output_section::do_reset_address_and_file_offset): Removed
> >>> handling of NOLOAD.
> >>> * output.h (Output_section): Removed is_noload() and
> >>> removed member is_noload_.
> >>> * script-sections.cc
> >>> removed special handling of NOLOAD.
> >>> (Sort_output_sections::operator()): Removed sorting of NOLOAD