summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ELF/weak-diff.s
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo".George Rimar2018-02-201-1/+1
| | | | | | | | | | | For instructions like call foo and jmp foo patch changes relocation produced from R_X86_64_PC32 to R_X86_64_PLT32. Relocation can be used as a marker for 32-bit PC-relative branches. Linker will reduce PLT32 relocation to PC32 if function is defined locally. Differential revision: https://reviews.llvm.org/D43383 llvm-svn: 325569
* Compute A-B when A or B is weak.Rafael Espindola2015-04-171-2/+16
| | | | | | | | | | | | | | | | | | | | Similar to r235222, but for the weak symbol case. In an "ideal" assembler/object format an expression would always refer to the final value and A-B would only be computed from a section in the same comdat as A and B with A and B strong. Unfortunately that is not the case with debug info on ELF, so we need an heuristic. Since we need an heuristic, we may as well use the same one as gas: * call weak_sym : produces a relocation, even if in the same section. * A - weak_sym and weak_sym -A: don't produce a relocation if we can compute it. This fixes pr23272 and changes the fix of pr22815 to match what gas does. llvm-svn: 235227
* Don't be over eager in evaluating a subtraction with a weak symbol.Rafael Espindola2015-03-241-0/+12
In a subtraction of the form A - B, if B is weak, there is no way to represent that on ELF since all relocations add the value of a symbol. llvm-svn: 233139
OpenPOWER on IntegriCloud