Commit ecce3a6
[BOLT] Run PatchEntries pass before LongJmp (llvm#137236)
With --force-patch option, every original function entry point is
overwritten with a trampoline to a new version of the function to
prevent the execution of the original code.
If the function size is too small for the trampoline code, we are forced
to bail out on rewriting the function. That presented a problem on
AArch64 due to LongJmp pass that assumed the presence of the new copy of
the function. If the new copy was not emitted it could have lead to a
relocation overflow.
Run PatchEntries pass before LongJmp and make the latter aware of the
functions that are not going to be emitted. Make --force-patch option
behavior on AArch64 consistent with other architectures.1 parent e389f16 commit ecce3a6
File tree
2 files changed
+5
-16
lines changed- bolt/lib
- Passes
- Rewrite
2 files changed
+5
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 101 | | |
113 | 102 | | |
114 | 103 | | |
115 | | - | |
| 104 | + | |
116 | 105 | | |
117 | 106 | | |
118 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
500 | 504 | | |
501 | 505 | | |
502 | 506 | | |
| |||
524 | 528 | | |
525 | 529 | | |
526 | 530 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| |||
0 commit comments