All of lore.kernel.org
 help / color / mirror / Atom feed
* Trying to make a working kernel with the gold linker
@ 2012-04-11  2:23 Theodore Ts'o
  2012-04-11  3:59 ` H. Peter Anvin
  2012-04-11  4:51 ` Markus Trippelsdorf
  0 siblings, 2 replies; 7+ messages in thread
From: Theodore Ts'o @ 2012-04-11  2:23 UTC (permalink / raw)
  To: linux-kernel, hjl.tools


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11  2:23 Trying to make a working kernel with the gold linker Theodore Ts'o
@ 2012-04-11  3:59 ` H. Peter Anvin
  2012-04-11  4:51 ` Markus Trippelsdorf
  1 sibling, 0 replies; 7+ messages in thread
From: H. Peter Anvin @ 2012-04-11  3:59 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-kernel, hjl.tools

On 04/10/2012 07:23 PM, Theodore Ts'o wrote:
> 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?

It would also be kind of nice if the ELF image generated for the kernel
didn't contain several megabytes of zero that serve no purpose and have
to be decompressed at boot time...

	-hpa


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11  2:23 Trying to make a working kernel with the gold linker Theodore Ts'o
  2012-04-11  3:59 ` H. Peter Anvin
@ 2012-04-11  4:51 ` Markus Trippelsdorf
  2012-04-11 18:05   ` Ted Ts'o
  1 sibling, 1 reply; 7+ messages in thread
From: Markus Trippelsdorf @ 2012-04-11  4:51 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-kernel, hjl.tools

On 2012.04.10 at 22:23 -0400, Theodore Ts'o wrote:
> 
> 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?

Yes. I use it regularly. The last problems were fixed two years ago.
Please try a more recent version.

-- 
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11  4:51 ` Markus Trippelsdorf
@ 2012-04-11 18:05   ` Ted Ts'o
  2012-04-11 18:28     ` Markus Trippelsdorf
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Ts'o @ 2012-04-11 18:05 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: linux-kernel, hjl.tools

On Wed, Apr 11, 2012 at 06:51:07AM +0200, Markus Trippelsdorf wrote:
> 
> Yes. I use it regularly. The last problems were fixed two years ago.
> Please try a more recent version.

Thanks, I'll give that a try.  Next stupid question; for a variety of
reasons, the Corporate I/T folks require that I stay stuck on Ubuntu
10.04.  Are there any incompatibility problems with using the most
recently released binutils-gold and gcc 4.4.3-4ubuntu5.1?  Basically,
can I just compile a new version of binutils, or do I need to upgrade
my entire compiler toolchain?

Thanks,

						- Ted

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11 18:05   ` Ted Ts'o
@ 2012-04-11 18:28     ` Markus Trippelsdorf
  2012-04-11 19:13       ` Ted Ts'o
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Trippelsdorf @ 2012-04-11 18:28 UTC (permalink / raw)
  To: Ted Ts'o, linux-kernel, hjl.tools

On 2012.04.11 at 14:05 -0400, Ted Ts'o wrote:
> On Wed, Apr 11, 2012 at 06:51:07AM +0200, Markus Trippelsdorf wrote:
> > 
> > Yes. I use it regularly. The last problems were fixed two years ago.
> > Please try a more recent version.
> 
> Thanks, I'll give that a try.  Next stupid question; for a variety of
> reasons, the Corporate I/T folks require that I stay stuck on Ubuntu
> 10.04.  Are there any incompatibility problems with using the most
> recently released binutils-gold and gcc 4.4.3-4ubuntu5.1?  Basically,
> can I just compile a new version of binutils, or do I need to upgrade
> my entire compiler toolchain?

Just compiling and installing a new binutils version should work fine.

(But you should nonetheless consider to also upgrade gcc, because
gcc-4.4 is ancient and not even officially maintained anymore...)

-- 
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11 18:28     ` Markus Trippelsdorf
@ 2012-04-11 19:13       ` Ted Ts'o
  2012-04-11 19:18         ` H.J. Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Ts'o @ 2012-04-11 19:13 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: linux-kernel, hjl.tools

On Wed, Apr 11, 2012 at 08:28:56PM +0200, Markus Trippelsdorf wrote:
> 
> Just compiling and installing a new binutils version should work fine.
> 
> (But you should nonetheless consider to also upgrade gcc, because
> gcc-4.4 is ancient and not even officially maintained anymore...)

Well *someone* has to still make sure the kernel compiles correctly on
the enterprise distro's that a huge number of Linux users use...
(including RHEL 6, Debian Stable, SLES 11, Ubuntu LTS 10.04, etc.)

:-)

But yeah, I hope to get off of Ubuntu LTS real soon now, and onto
something a bit more hip, such as Debian testing.

						- Ted

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to make a working kernel with the gold linker
  2012-04-11 19:13       ` Ted Ts'o
@ 2012-04-11 19:18         ` H.J. Lu
  0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 2012-04-11 19:18 UTC (permalink / raw)
  To: Ted Ts'o, Markus Trippelsdorf, linux-kernel, hjl.tools

On Wed, Apr 11, 2012 at 12:13 PM, Ted Ts'o <tytso@mit.edu> wrote:
> On Wed, Apr 11, 2012 at 08:28:56PM +0200, Markus Trippelsdorf wrote:
>>
>> Just compiling and installing a new binutils version should work fine.
>>
>> (But you should nonetheless consider to also upgrade gcc, because
>> gcc-4.4 is ancient and not even officially maintained anymore...)
>
> Well *someone* has to still make sure the kernel compiles correctly on
> the enterprise distro's that a huge number of Linux users use...
> (including RHEL 6, Debian Stable, SLES 11, Ubuntu LTS 10.04, etc.)
>
> :-)
>
> But yeah, I hope to get off of Ubuntu LTS real soon now, and onto
> something a bit more hip, such as Debian testing.
>
>                                                - Ted

To build Linux kernel with gold, you should at least try gold in
binutils 2.22.

-- 
H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-11 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11  2:23 Trying to make a working kernel with the gold linker Theodore Ts'o
2012-04-11  3:59 ` 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

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.