
Create entry points for addresses referenced by dynamic relocations and allow getNewFunctionOrDataAddress to map addrs inside functions. By adding addresses referenced by dynamic relocations as entry points. This patch fixes an issue where bolt fails on code using computing goto's. This also fixes a mapping issue with the bugfix from this PR: https://github.com/llvm/llvm-project/pull/117766.
19 lines
244 B
C
19 lines
244 B
C
int main(int argc, char *argv[]) {
|
|
static const void *T1[] = {&&L1, &&L2};
|
|
static const void *T2[] = {&&L2, &&L3};
|
|
|
|
const void **T = (argc > 1) ? T1 : T2;
|
|
|
|
int i = 0;
|
|
|
|
L0:
|
|
goto *T[argc];
|
|
L1:
|
|
++i;
|
|
L2:
|
|
i++;
|
|
L3:
|
|
i++;
|
|
return i;
|
|
}
|