Commit ab158cd
authored
Auto merge of #142568 - bjorn3:windows_symbols_o_export, r=<try>
Use the .drectve section for exporting symbols from dlls on Windows
While it would be reasonable to expect the Windows linker to handle linker args in the .drectve section identical to cli arguments, as it turns out exporting weak symbols only works when the /EXPORT is in the .drectve section, not when it is a linker argument or when a .DEF file is used.
Necessary for and extracted out of #142366.
Thanks `@dpaoliello` for figuring out this weird quirk of link.exe!
try-job: dist-i686-msvcFile tree
3 files changed
+66
-47
lines changed- compiler/rustc_codegen_ssa/src/back
- tests/ui/linking
3 files changed
+66
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1957 | 1957 | | |
1958 | 1958 | | |
1959 | 1959 | | |
1960 | | - | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
1961 | 1963 | | |
1962 | | - | |
| 1964 | + | |
1963 | 1965 | | |
1964 | 1966 | | |
1965 | 1967 | | |
| |||
1996 | 1998 | | |
1997 | 1999 | | |
1998 | 2000 | | |
1999 | | - | |
| 2001 | + | |
2000 | 2002 | | |
2001 | 2003 | | |
2002 | 2004 | | |
| |||
2054 | 2056 | | |
2055 | 2057 | | |
2056 | 2058 | | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2057 | 2094 | | |
2058 | 2095 | | |
2059 | 2096 | | |
| |||
2228 | 2265 | | |
2229 | 2266 | | |
2230 | 2267 | | |
| 2268 | + | |
2231 | 2269 | | |
| 2270 | + | |
2232 | 2271 | | |
2233 | 2272 | | |
2234 | 2273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | 1100 | | |
1113 | 1101 | | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1117 | 1105 | | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
| 1106 | + | |
1147 | 1107 | | |
1148 | 1108 | | |
1149 | 1109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments