Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel

Ian Lance Taylor iant@google.com
Fri Apr 23 00:00:00 GMT 2010


"H.J. Lu" <hjl.tools@gmail.com> writes:

> If gold should be compatible with ld, this patch should be applied.
>
>
> -- 
> H.J.
> ---
> diff --git a/gold/x86_64.cc b/gold/x86_64.cc
> index 9110278..99be4de 100644
> --- a/gold/x86_64.cc
> +++ b/gold/x86_64.cc
> @@ -516,7 +516,7 @@ const Target::Target_info Target_x86_64::x86_64_info =
>    '\0',       // wrap_char
>    "/lib/ld64.so.1",     // program interpreter
>    0x400000,      // default_text_segment_address
> -  0x1000,     // abi_pagesize (overridable by -z max-page-size)
> +  0x200000,      // abi_pagesize (overridable by -z max-page-size)
>    0x1000,     // common_pagesize (overridable by -z common-page-size)
>    elfcpp::SHN_UNDEF,   // small_common_shndx
>    elfcpp::SHN_X86_64_LCOMMON,   // large_common_shndx


That patch incurs a cost for every x86_64 executable and shared
library by making them larger and making them use much more address
space than they really require.  At present there are very few
programs which need a large page size.  I would prefer to encourage
them to use the -z max-page-size option if at all possible.

Ian



More information about the Binutils mailing list