This is the mail archive of the binutils@sourceware.org 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: Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel


On Thu, Apr 22, 2010 at 5:00 PM, Ian Lance Taylor <iant@google.com> wrote:
> "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.
>

2MB maximum page size may have a bigger gap between PT_LOAD
segment in memory than 4KB maximum page size. But it doesn't necessarily
use more memory nor disk space. Since x86_64 is 64bit, address
space shouldn't be an issue in vast majority cases. I'd like to hear
a case to say otherwise.

Thanks.

-- 
H.J.


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