All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: linux-kernel@vger.kernel.org, hjl.tools@gmail.com
Subject: Trying to make a working kernel with the gold linker
Date: Tue, 10 Apr 2012 22:23:33 -0400	[thread overview]
Message-ID: <E1SHnDZ-0006Za-Kh@tytso-glaptop.cam.corp.google.com> (raw)


So I was trying to see if I could make the kernel build with the gold
linker (since until it can, I can't install it on my system).

I saw a message from HJ indicating one of the problems was x86_64 gold
used an incompatible max-page-size setting, so I tried changing it in
hopes that would make a bootable kernel.

No dice, it didn't work.  (At least not with a 2.20 binutils-gold.)

Does anybody know what the other issues with the gold linker?  Is the
2.22 binutils-gold more likely to work?

Thanks,

					- Ted


diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 41a7237..ad769ed 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -119,7 +119,11 @@ asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
 KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr)
 KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr)
 
+ifeq ($(CONFIG_X86_32),y)
 LDFLAGS := -m elf_$(UTS_MACHINE)
+else
+LDFLAGS := -m elf_$(UTS_MACHINE) -z max-page-size=0x200000
+endif
 
 # Speed up the build
 KBUILD_CFLAGS += -pipe

             reply	other threads:[~2012-04-11  2:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  2:23 Theodore Ts'o [this message]
2012-04-11  3:59 ` Trying to make a working kernel with the gold linker H. Peter Anvin
2012-04-11  4:51 ` Markus Trippelsdorf
2012-04-11 18:05   ` Ted Ts'o
2012-04-11 18:28     ` Markus Trippelsdorf
2012-04-11 19:13       ` Ted Ts'o
2012-04-11 19:18         ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1SHnDZ-0006Za-Kh@tytso-glaptop.cam.corp.google.com \
    --to=tytso@mit.edu \
    --cc=hjl.tools@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.