Commit cb5cb69
committed
[LLD][COFF] Check both mangled and demangled symbols before adding a lazy archive symbol to the symbol table on ARM64EC
On ARM64EC, a function symbol may appear in both mangled and demangled forms:
- ARM64EC archives contain only the mangled name, while the demangled symbol is
defined by the object file as an alias.
- x86_64 archives contain only the demangled name (the mangled name is usually
defined by an object referencing the symbol as an alias to a guess exit thunk).
- ARM64EC import files contain both the mangled and demangled names for thunks.
If more than one archive defines the same function, this could lead to
different libraries being used for the same function depending on how they
are referenced. Avoid this by checking if the paired symbol is already defined
before adding a symbol to the table.1 parent 0c80919 commit cb5cb69
2 files changed
+62
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
631 | 632 | | |
632 | 633 | | |
633 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
634 | 671 | | |
635 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
636 | 676 | | |
637 | 677 | | |
638 | 678 | | |
| |||
648 | 688 | | |
649 | 689 | | |
650 | 690 | | |
| 691 | + | |
| 692 | + | |
651 | 693 | | |
652 | 694 | | |
653 | 695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
78 | 93 | | |
79 | 94 | | |
80 | 95 | | |
| |||
130 | 145 | | |
131 | 146 | | |
132 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
0 commit comments