Commit ab12b43
authored
[NFCI][ELF] Store DynamicReloc Kind as two bools
Aside from Computed, Kind is now just AddendOnly and AgainstSymbol, so
it's really just a bool reflecting whether the resulting ELF relocation
should reference the symbol or not. Refactor DynamicReloc's storage to
reflect this, splitting Computed out into its own orthogonal isFinal
bool. As part of this, rename computeRaw to finalize to reflect that
it's side-effecting.
This also allows needsDynSymIndex() to work even after finalize(), so
drop the existing assertion.
A future commit will refact the DynamicReloc API to take isAgainstSymbol
directly now the enum serves little purpose, as a more invasive,
mechanical change. For this commit we keep DynamicReloc::Kind as the
external API.
Reviewers: MaskRay, arichardson
Reviewed By: MaskRay, arichardson
Pull Request: #1508121 parent 1522ad9 commit ab12b43
2 files changed
+20
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1643 | 1643 | | |
1644 | 1644 | | |
1645 | 1645 | | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
1657 | 1650 | | |
1658 | 1651 | | |
1659 | 1652 | | |
| |||
1734 | 1727 | | |
1735 | 1728 | | |
1736 | 1729 | | |
1737 | | - | |
| 1730 | + | |
1738 | 1731 | | |
1739 | 1732 | | |
1740 | 1733 | | |
1741 | | - | |
| 1734 | + | |
1742 | 1735 | | |
1743 | 1736 | | |
1744 | 1737 | | |
1745 | 1738 | | |
1746 | 1739 | | |
1747 | | - | |
| 1740 | + | |
1748 | 1741 | | |
1749 | 1742 | | |
1750 | 1743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | 424 | | |
428 | 425 | | |
429 | 426 | | |
| |||
438 | 435 | | |
439 | 436 | | |
440 | 437 | | |
441 | | - | |
| 438 | + | |
| 439 | + | |
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
| |||
447 | 445 | | |
448 | 446 | | |
449 | 447 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
| 448 | + | |
454 | 449 | | |
455 | 450 | | |
456 | 451 | | |
457 | 452 | | |
458 | 453 | | |
459 | 454 | | |
460 | | - | |
| 455 | + | |
461 | 456 | | |
462 | 457 | | |
463 | 458 | | |
| |||
470 | 465 | | |
471 | 466 | | |
472 | 467 | | |
473 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
| |||
0 commit comments