Commit be3fd6a
authored
[LoongArch] Use section-relaxable check instead of relax feature from STI (llvm#153792)
In some cases, such as using `lto` or `llc`, relax feature is not
available from this `SubtargetInfo` (`LoongArchAsmBackend` is
instantiated too early), causing loss of relocations.
This commit modifiy the condition to check whether the section which
contains the two symbols is relaxable. If not relaxable, no need to
record relocations.1 parent db843e5 commit be3fd6a
File tree
2 files changed
+11
-17
lines changed- llvm
- lib/Target/LoongArch/MCTargetDesc
- test/CodeGen/LoongArch
2 files changed
+11
-17
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
Lines changed: 9 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 4 | + | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
| |||
20 | 14 | | |
21 | 15 | | |
22 | 16 | | |
23 | | - | |
24 | | - | |
| 17 | + | |
| 18 | + | |
25 | 19 | | |
26 | | - | |
27 | | - | |
| 20 | + | |
| 21 | + | |
28 | 22 | | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | | - | |
| 26 | + | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
43 | | - | |
| 36 | + | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
| |||
0 commit comments