summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/merge-string-error.s
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] Make the rule to create relative relocations in a writable section ↵Fangrui Song2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stricter The current rule is loose: `!Sym.IsPreemptible || Expr == R_GOT`. When the symbol is non-preemptable, this allows absolute relocation types with smaller numbers of bits, e.g. R_X86_64_{8,16,32}. They are disallowed by ld.bfd and gold, e.g. ld.bfd: a.o: relocation R_X86_64_8 against `.text' can not be used when making a shared object; recompile with -fPIC This patch: a) Add TargetInfo::SymbolicRel to represent relocation types that resolve to a symbol value (e.g. R_AARCH_ABS64, R_386_32, R_X86_64_64). As a side benefit, we currently (ab)use GotRel (R_*_GLOB_DAT) to resolve GOT slots that are link-time constants. Since we now use Target->SymbolRel to do the job, we can remove R_*_GLOB_DAT from relocateOne() for all targets. R_*_GLOB_DAT cannot be used as static relocation types. b) Change the condition to `!Sym.IsPreemptible && Type != Target->SymbolicRel || Expr == R_GOT`. Some tests are caught by the improved error checking (ld.bfd/gold also issue errors on them). Many misuse .long where .quad should be used instead. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D63121 llvm-svn: 363059
* [LLD] Check too large offsets into merge sections earlierBen Dunbobbin2018-08-311-1/+1
| | | | | | | | | | | | | | | | | This patch moves the checking for too large offsets into merge sections earlier. Without this change the large offset generated in the added test-case will cause an assert (as it happens to be a value reserved as a "tombstone" in the DenseMap implementation) when OffsetMap is queried in getSectionPiece(). To simplify the code and avoid future mistakes I have refactored so that there is only one function that looks up offsets in the OffsetMap. Differential Revision: https://reviews.llvm.org/D51180 llvm-svn: 341206
* [ELF] Replace unused output filenames with /dev/null in testsFangrui Song2018-07-021-1/+1
| | | | | | Post commit review at rLLD335992 llvm-svn: 336129
* [ELF] Refactor several error messagesEugene Leviant2016-11-231-1/+1
| | | | | | Differential revision: https://reviews.llvm.org/D26970 llvm-svn: 287753
* Include filenames and section names to error messages.Rui Ueyama2016-08-031-1/+1
| | | | llvm-svn: 277566
* Don't depend on dynamic relocatinos in ro sections.Rafael Espindola2016-05-041-1/+1
| | | | | | | | Currently we don't check when creating relative relocations if the section is read only or not. I am about to fix that, so first update the patches that depend on the current behavior. llvm-svn: 268542
* Recommit of r263252, [ELF] - Change all messages to lowercase to be consistent.George Rimar2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | which was reverted because included unrelative changes by mistake. Original commit message: [ELF] - Change all messages to lowercase to be consistent. That is directly opposite to http://reviews.llvm.org/D18045, which was reverted. This patch changes all messages to start from lowercase letter if they were not before. That is done to be consistent with clang. Differential revision: http://reviews.llvm.org/D18085 llvm-svn: 263337
* Revert r263252: "[ELF] - Change all messages to lowercase to be consistent."Rui Ueyama2016-03-111-1/+1
| | | | | | This reverts commit r263252 because the change contained unrelated changes. llvm-svn: 263272
* [ELF] - Change all messages to lowercase to be consistent.George Rimar2016-03-111-1/+1
| | | | | | | | | | | | | | That is directly opposite to http://reviews.llvm.org/D18045, which was reverted. This patch changes all messages to start from lowercase letter if they were not before. That is done to be consistent with clang. Differential revision: http://reviews.llvm.org/D18085 llvm-svn: 263252
* Rename ld.lld2 to ld.lld since it is the default.Rafael Espindola2015-11-181-1/+1
| | | | llvm-svn: 253437
* Rename test/elf2 to test/ELF.Rafael Espindola2015-11-171-0/+11
llvm-svn: 253313
OpenPOWER on IntegriCloud