summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/non-alloc.s
Commit message (Collapse)AuthorAgeFilesLines
* [lld][NFC] Update tests to use -S instead of -s when using llvm-readelf.Jordan Rupprecht2018-11-051-1/+1
| | | | | | | | | | | | | | Summary: llvm-readobj/readelf accepts both -s and -S as aliases for --sections. However with GNU readelf only -S means --section, and -s means --symbols. I would like to make llvm-readelf more compatible. Reviewers: MaskRay, espindola Reviewed By: MaskRay Subscribers: emaste, arichardson, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D54118 llvm-svn: 346164
* [ELF] Make non-writable non-executable PROGBITS sections closer to .textFangrui Song2018-06-261-1/+1
| | | | | | | | | | | | This generalizes the old heuristic placing SHT_DYNSYM SHT_DYNSTR first in the readonly SHF_ALLOC segment. Reviewers: espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D48406 llvm-svn: 335674
* [ELF] Assign RF_EXEC rank even if --no-rosegment or SECTIONS command is usedFangrui Song2018-06-261-1/+1
| | | | | | | | | | | | | | | | | Summary: Currently when --no-rosegment is specified or a linker script with SECTIONS command is used, .rodata (A) .text (AX) are assigned the same rank and .rodata may be placed after .text . This increases the gap between .text and .bss and can cause pc-relative relocation overflow (e.g. gcc crtbegin.o crtbegin.S have R_X86_64_PC32 relocation from .text to .bss). This patch makes SingleRoRx affect only segment layout, not section layout. As a consequence, .rodata will be placed before .text regardless of SingleRoRx. Reviewers: espindola, ruiu, grimar, echristo, javed.absar Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D48405 llvm-svn: 335627
* [ELF] Change test files for style consistency. NFCFangrui Song2018-06-251-3/+3
| | | | | | | | | * Move `REQUIRES:` line to the top * llvm-mc ... -o %t -> llvm-mc ... -o %t.o * Don't check "TEXT" "DATA" columns (they are bfd-style names that do not fit into llvm well) in llvm-objdump output llvm-svn: 335498
* [ELF] readobj -elf-output-style=GNU -> readelfFangrui Song2018-06-251-1/+1
| | | | | | Style change for consistency. NFC llvm-svn: 335494
* [lld] Mitigate relocation overflow [part 1 of 2].Han Shen2018-05-151-1/+1
| | | | | | | | | | | This CL places .dynsym and .dynstr at the beginning of SHF_ALLOC sections. We do this to mitigate the possibility that huge .dynsym and .dynstr sections placed between ro-data and text sections cause relocation overflow. Differential Revision: https://reviews.llvm.org/D45788 llvm-svn: 332374
* [ELF] - Revert of: r332038, r332054, r332060, r332061, r332062, r332063George Rimar2018-05-111-1/+1
| | | | | | | | | | | This reverts "Mitigate relocation overflow [part 1 of 2]." and the following commits which were trying to fix the bots. At the moment of r332082, bots are still failing and we need to find the reason of test case breakages first of all. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/17042/steps/test/logs/stdio http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/29845/steps/test/logs/stdio llvm-svn: 332085
* Mitigate relocation overflow [part 1 of 2].Han Shen2018-05-101-1/+1
| | | | | | | | | | | | This CL is to mitigate R_X86_64_PC32 relocation overflow problems for huge binaries that has near 4G allocated sections. By examining those binaries, there're 2 issues contributes to the problem: 1). huge ".dynsym" and ".dynstr" stands in the way between .rodata and .text 2). _init_array_start/end are placed at 0 if no ".init_array" presents, this causes .text relocation against them become more prone to overflow. This CL addresses 1st problem (the 2nd will be addressed in another CL.) by assigning a smaller sortrank to .dynsym and .dynstr thus they no longer stand in between. llvm-svn: 332038
* [ELF] - Do --hash-style=both by default.George Rimar2017-10-061-1/+1
| | | | | | | | | | | | | | Its PR34712, GNU linkers recently changed default values to "both" of "sysv". Patch do the same for all targets except MIPS, where .gnu.hash section is not yet supported. Code suggested by Rui Ueyama. Differential revision: https://reviews.llvm.org/D38407 llvm-svn: 315051
* Don't create a bogus PT_PHDR if we don't allocate the headers.Rafael Espindola2017-01-201-4/+2
| | | | llvm-svn: 292644
* Don't put ro before rx when using linker scripts.Rafael Espindola2016-09-291-1/+1
| | | | | | | | Since they end up going on the same PT_LOAD, there is no reason to sort them. This matches bfd's behaviour and is user visible in the placement of orphan sections. llvm-svn: 282799
* Disable --rosegment when we have linker scripts.Rafael Espindola2016-09-201-4/+2
| | | | | | | | Linker scripts are responsible for aliging '.'. Since they are designed for bfd which has no --rosegment, they don't align the RO to RX transition. llvm-svn: 281978
* Put SHF_ALLOC sections first, even with linker scripts.Rafael Espindola2016-09-161-5/+4
| | | | | | | | | | | | This matches gold and bfd, and is pretty much required by some linker scripts. They end with commands like foo 0 : { *(bar) } if we put any SHF_ALLOC sections after they can have an address that is too low. llvm-svn: 281778
* Make sure we create all necessary PT_LOADs.Rafael Espindola2016-09-151-0/+28
We were some times stopping early when using linker scripts. llvm-svn: 281647
OpenPOWER on IntegriCloud