[PATCH] D60470: [DWARF] Prefer larger DW_AT_low_pc when constructing aranges
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 07:12:31 PDT 2019
MaskRay added a comment.
> It's not even a new issue. We've had this problem for years in the PlayStation proprietary linker, because ASLR-enabled executables have a 0 base address.
Ah, right! I forgot about the PIE case.
if (Config->ImageBase) // --image-base= option
return *Config->ImageBase;
return Config->Pic ? 0 : DefaultImageBase; // otherwise, image base is 0 if -shared or -pie
`-static` makes it easier to run into this problem as there is no huge `.dynsym .dynstr`. lld's different section layout alleviates the problem due to its placement of `.rodata .eh_frame` before `.text`.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60470/new/
https://reviews.llvm.org/D60470
More information about the llvm-commits
mailing list