[PATCH] D23505: [ELF] - Linkrscript: change the way of creating PT_LOADs segments when LS is used.

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 01:17:52 PDT 2016


evgeny777 added a comment.

> 2 and 3 lld loads are not aligned to memory page. Script does not so that, assuming that


I think you mean these ones:

> LOAD           0x00000000000e4110 0xffffffff800e5110 0xffffffff800e5110

>  LOAD           0x0000000000c86c20 0xffffffff80c87c20 0xffffffff80c87c20


What I see is that file offset and VA are properly aligned.

(0x00000000000e4110 mod 0x1000) == (0xffffffff800e5110 mod 0x1000) == 0x110

and

(0x0000000000c86c20 mod 0x1000) == (0xffffffff80c87c20 mod 0x1000) == 0xc20

If it were just some ELF binary it would work fine.
Does FreeBSD bootloader require segments to start on page boundary? Did you check this?


https://reviews.llvm.org/D23505





More information about the llvm-commits mailing list