llvm-project/lld/ELF/Arch
Peter Smith 4e21c770ec [ELF] Full support for -n (--nmagic) and -N (--omagic) via common page
The -n (--nmagic) disables page alignment, and acts as a -Bstatic
The -N (--omagic) does what -n does but also marks the executable segment as
writeable. As page alignment is disabled headers are not allocated unless
explicit in the linker script.

To disable page alignment in LLD we choose to set the page sizes to 1 so
that any alignment based on the page size does nothing. To set the
Target->PageSize to 1 we implement -z common-page-size, which has the side
effect of allowing the user to set the value as well.

Setting the page alignments to 1 does mean that any use of
CONSTANT(MAXPAGESIZE) or CONSTANT(COMMONPAGESIZE) in a linker script will
return 1, unlike in ld.bfd. However given that -n and -N disable paging
these probably shouldn't be used in a linker script where -n or -N is in
use.

Differential Revision: https://reviews.llvm.org/D61688

llvm-svn: 360593
2019-05-13 16:01:26 +00:00
..
AArch64.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AMDGPU.cpp Improve error message for unknown relocations. 2019-02-14 18:02:20 +00:00
ARM.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVR.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Hexagon.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MSP430.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.cpp [mips] Fix ld instruction in PLT entries on MIPS64 2019-05-07 20:26:23 +00:00
MipsArchTree.cpp ELF: De-template ELFFileBase. NFCI. 2019-04-05 20:16:26 +00:00
PPC.cpp Create an instance of Target after reading all input files. NFC. 2019-03-28 17:38:53 +00:00
PPC64.cpp [PPC64] Define getThunkSectionSpacing() based on the range of R_PPC64_REL24 2019-05-10 05:51:00 +00:00
RISCV.cpp [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations 2019-04-09 11:39:23 +00:00
SPARCV9.cpp [ELF] Full support for -n (--nmagic) and -N (--omagic) via common page 2019-05-13 16:01:26 +00:00
X86.cpp [ELF][X86] Allow R_386_TLS_LDO_32 and R_X86_64_DTPOFF{32,64} to preemptable local-dynamic symbols 2019-04-22 03:10:40 +00:00
X86_64.cpp [PPC64] toc-indirect to toc-relative relaxation 2019-05-07 04:26:05 +00:00