This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold-linked dragonfly kernel unbootable, likely due to segment page size, alignment
- From: Ian Lance Taylor <iant at google dot com>
- To: John Marino <binutils at marino dot st>
- Cc: binutils at sourceware dot org
- Date: Tue, 21 Feb 2012 05:38:58 -0800
- Subject: Re: gold-linked dragonfly kernel unbootable, likely due to segment page size, alignment
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.229.102.75 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
- References: <4F412BDE.5000600@marino.st> <mcrhaykq2hm.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <4F435910.1060602@marino.st>
John Marino <binutils@marino.st> writes:
> Anyway, something must have changed in header handling between gold
> from binutils 2.21 and binutils 2.22 with regards to headers, because
> a kernel and boot loader linked with gold from 2.21 did boot and
> function.
Yes, various things have changed.
> So this header handling behavior is hard-coded into gold? There's no
> switch, no script option, no build default that could be used/changed
> to get the header handling to match what gnu ld is doing? I'm a
> little nervous about turning off page alignment at this time.
The header handling behaviour is hardcoded, yes. That said, you should
be able to control the program headers by using an explicit PHDRS
section in your linker script. PHDRS are supported by both GNU ld and
gold.
> Also I'm curious why gold is defaulting to 0x1000 page alignment on
> x86_64 when the same script on gnu ld results in alignment at
> 0x200000.
The default maxpagesize is different for GNU ld and gold. However, I'm
surprised that using -z max_page_size -z common_page_size didn't fix
that.
Ian