[PATCH] D27042: lld: Default image base address to 0x400000

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 09:19:26 PST 2016


On 23 November 2016 at 11:15, Meador Inge <meadori at codesourcery.com> wrote:
> On Wed, Nov 23, 2016 at 09:19:37AM -0500, Rafael EspĂ­ndola via llvm-commits wrote:
>
>> I would have a small preference for 2MB on X86_64 and 4MB on x86 (if
>> anyone cares about x86).
>
> Out curiosity, why?
>
> On Linux, I see GNU LD uses `0x400000` for x86_64 and AArch64.
> It uses `0x08048000` for i386.  It would be nice to understand
> why GNU LD uses those particular values.

IMHO one of the things that has benefitted lld a lot so far is
avoiding cargo cult. If anything, not doing something just because
bfd/gold does it means in the worst case we get to find out why (and
document) they were doing it.

In the thread you posted I cannot find out why the value was chosen.
Have I missed something?

Thanks,
Rafael


More information about the llvm-commits mailing list