GNU Binutils with patches for OS216
修订版 | 34a30b6758db4fe53b2872d7bd3824c778f6118c (tree) |
---|---|
时间 | 2019-09-06 01:37:38 |
作者 | Eric Botcazou <ebotcazou@gcc....> |
Commiter | Eric Botcazou |
Fix PR ld/24574
This restores a line that has been dropped when the auto-import feature
of the PE-COFF linker was overhauled about one year. It is necessary
for GDB to properly resolve extern symbol in DLLs.
ld/ChangeLog
* pe-dll.c (pe_find_data_imports): Replace again the original name
of the undefined symbol with the imp_ prefixed one after it is
resolved.
@@ -1,3 +1,9 @@ | ||
1 | +2019-09-05 Eric Botcazou <ebotcazou@adacore.com> | |
2 | + | |
3 | + PR ld/24574 | |
4 | + * pe-dll.c (pe_find_data_imports): Replace again the original name of | |
5 | + the undefined symbol with the __imp_ prefixed one after it is resolved. | |
6 | + | |
1 | 7 | 2019-05-17 Alan Modra <amodra@gmail.com> |
2 | 8 | |
3 | 9 | PR 24567 |
@@ -1445,6 +1445,11 @@ pe_find_data_imports (const char *symhead, | ||
1445 | 1445 | undef->u.def.value = sym->u.def.value; |
1446 | 1446 | undef->u.def.section = sym->u.def.section; |
1447 | 1447 | |
1448 | + /* We replace the original name with the __imp_ prefixed one, this | |
1449 | + 1) may trash memory 2) leads to duplicate symbols. But this is | |
1450 | + better than having a misleading name that can confuse GDB. */ | |
1451 | + undef->root.string = sym->root.string; | |
1452 | + | |
1448 | 1453 | if (link_info.pei386_auto_import == -1) |
1449 | 1454 | { |
1450 | 1455 | static bfd_boolean warned = FALSE; |