Bug ID: 41522
Summary: Need support for the -n, --nmagic option for linux
kernel link on AArch64
CC: email@example.com, peter.sm...@linaro.org
LLD doesn't currently support the -n, --nmagic option that is now required to
compile the Linux Kernel VDSO shared object (shared object mapped into all
user-space programs to provide support for system calls). The patch to enforce
The -n option is similar to the -N, --omagic option that is partially supported
by LLD (https://reviews.llvm.org/D26888). My understanding is:
-n (turn off page alignment)
-N (turn off page alignment, do not make text readonly)
LLD does not turn off page alignment with -N but it does apply the "do not make
text readonly" part.
I suspect that supporting -n may be as simple as aliasing it to
-zmax-page-size=1 but I'll need to double check for any other side-effects in
ld.bfd first. Note that -zmax-page-size=1 doesn't quite do the same thing in
ld.bfd as ld.lld, with ld.bfd the OutputSection alignment is set to whatever
-zmax-page-size= is set to, even if there is an InputSection with a greater
alignment, this can be overridden by the poorly documented ALIGN_WITH_INPUT
optional section attribute. By contrast ld.lld always behaves as if
ALIGN_WITH_INPUT is present.
The -n, --nmagic is also frequently used by embedded systems for
micro-controllers and other systems that lack a memory management system and
thus have no pages.
You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list