[PATCH] D29453: [ELF] - Allow going over alignment commands in algorithm of placing non-alloc orphans.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 16:06:25 PST 2017


ruiu added a comment.

I spent a fair amount of time to try to understand this, but this still looks really odd. My understanding is that, adding non-SHF_ALLOC sections doesn't change the current virtual address pointer (the '.' special variable), because non-allocatable sections are not mapped to the memory at runtime.

IIUC, what you wrote is `ASSERT(_end <= 0x8000)` in http://lxr.free-electrons.com/source/arch/x86/boot/setup.ld fails with LLD because LLD adds non-alloc sections after `.bss` but before `_end` symbol. But that's odd, because adding non-alloc sections shouldn't increment `.` variable.

What am I missing here? I would really appreciate if you describe it without too much examples, but why you think what you are doing is semantically correct.


https://reviews.llvm.org/D29453





More information about the llvm-commits mailing list