This is the mail archive of the 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]

Re: gold-linked dragonfly kernel unbootable, likely due to segment page size, alignment

John Marino <> 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

> 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


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