| ... | ... | @@ -864,8 +864,8 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 864 | 864 | // Example: |
| 865 | 865 | // .balign 4 |
| 866 | 866 | // .globl _Exit_2_2_5 |
| 867 | | // .type _Exit_2_2_5, %function; |
| 868 | | // .symver _Exit_2_2_5, _Exit@@GLIBC_2.2.5 |
| 867 | // .type _Exit_2_2_5, %function |
| 868 | // .symver _Exit_2_2_5, _Exit@@GLIBC_2.2.5, remove |
| 869 | 869 | // _Exit_2_2_5: .long 0 |
| 870 | 870 | const ver_index = versions_buffer[ver_buf_i]; |
| 871 | 871 | const ver = metadata.all_versions[ver_index]; |
| ... | ... | @@ -876,19 +876,16 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 876 | 876 | const want_default = chosen_def_ver_index != 255 and ver_index == chosen_def_ver_index; |
| 877 | 877 | const at_sign_str: []const u8 = if (want_default) "@@" else "@"; |
| 878 | 878 | if (ver.patch == 0) { |
| 879 | | const sym_plus_ver = if (want_default) |
| 880 | | sym_name |
| 881 | | else |
| 882 | | try std.fmt.allocPrint( |
| 883 | | arena, |
| 884 | | "{s}_GLIBC_{d}_{d}", |
| 885 | | .{ sym_name, ver.major, ver.minor }, |
| 886 | | ); |
| 879 | const sym_plus_ver = try std.fmt.allocPrint( |
| 880 | arena, |
| 881 | "{s}_{d}_{d}", |
| 882 | .{ sym_name, ver.major, ver.minor }, |
| 883 | ); |
| 887 | 884 | try stubs_asm.writer().print( |
| 888 | 885 | \\.balign {d} |
| 889 | 886 | \\.globl {s} |
| 890 | | \\.type {s}, %function; |
| 891 | | \\.symver {s}, {s}{s}GLIBC_{d}.{d} |
| 887 | \\.type {s}, %function |
| 888 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}, remove |
| 892 | 889 | \\{s}: {s} 0 |
| 893 | 890 | \\ |
| 894 | 891 | , .{ |
| ... | ... | @@ -904,19 +901,16 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 904 | 901 | wordDirective(target), |
| 905 | 902 | }); |
| 906 | 903 | } else { |
| 907 | | const sym_plus_ver = if (want_default) |
| 908 | | sym_name |
| 909 | | else |
| 910 | | try std.fmt.allocPrint( |
| 911 | | arena, |
| 912 | | "{s}_GLIBC_{d}_{d}_{d}", |
| 913 | | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 914 | | ); |
| 904 | const sym_plus_ver = try std.fmt.allocPrint( |
| 905 | arena, |
| 906 | "{s}_{d}_{d}_{d}", |
| 907 | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 908 | ); |
| 915 | 909 | try stubs_asm.writer().print( |
| 916 | 910 | \\.balign {d} |
| 917 | 911 | \\.globl {s} |
| 918 | | \\.type {s}, %function; |
| 919 | | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d} |
| 912 | \\.type {s}, %function |
| 913 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d}, remove |
| 920 | 914 | \\{s}: {s} 0 |
| 921 | 915 | \\ |
| 922 | 916 | , .{ |
| ... | ... | @@ -1041,9 +1035,9 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 1041 | 1035 | // Example: |
| 1042 | 1036 | // .balign 4 |
| 1043 | 1037 | // .globl environ_2_2_5 |
| 1044 | | // .type environ_2_2_5, %object; |
| 1045 | | // .size environ_2_2_5, 4; |
| 1046 | | // .symver environ_2_2_5, environ@@GLIBC_2.2.5 |
| 1038 | // .type environ_2_2_5, %object |
| 1039 | // .size environ_2_2_5, 4 |
| 1040 | // .symver environ_2_2_5, environ@@GLIBC_2.2.5, remove |
| 1047 | 1041 | // environ_2_2_5: .fill 4, 1, 0 |
| 1048 | 1042 | const ver_index = versions_buffer[ver_buf_i]; |
| 1049 | 1043 | const ver = metadata.all_versions[ver_index]; |
| ... | ... | @@ -1054,20 +1048,17 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 1054 | 1048 | const want_default = chosen_def_ver_index != 255 and ver_index == chosen_def_ver_index; |
| 1055 | 1049 | const at_sign_str: []const u8 = if (want_default) "@@" else "@"; |
| 1056 | 1050 | if (ver.patch == 0) { |
| 1057 | | const sym_plus_ver = if (want_default) |
| 1058 | | sym_name |
| 1059 | | else |
| 1060 | | try std.fmt.allocPrint( |
| 1061 | | arena, |
| 1062 | | "{s}_GLIBC_{d}_{d}", |
| 1063 | | .{ sym_name, ver.major, ver.minor }, |
| 1064 | | ); |
| 1051 | const sym_plus_ver = try std.fmt.allocPrint( |
| 1052 | arena, |
| 1053 | "{s}_{d}_{d}", |
| 1054 | .{ sym_name, ver.major, ver.minor }, |
| 1055 | ); |
| 1065 | 1056 | try stubs_asm.writer().print( |
| 1066 | 1057 | \\.balign {d} |
| 1067 | 1058 | \\.globl {s} |
| 1068 | | \\.type {s}, %object; |
| 1069 | | \\.size {s}, {d}; |
| 1070 | | \\.symver {s}, {s}{s}GLIBC_{d}.{d} |
| 1059 | \\.type {s}, %object |
| 1060 | \\.size {s}, {d} |
| 1061 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}, remove |
| 1071 | 1062 | \\{s}: .fill {d}, 1, 0 |
| 1072 | 1063 | \\ |
| 1073 | 1064 | , .{ |
| ... | ... | @@ -1085,20 +1076,17 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 1085 | 1076 | size, |
| 1086 | 1077 | }); |
| 1087 | 1078 | } else { |
| 1088 | | const sym_plus_ver = if (want_default) |
| 1089 | | sym_name |
| 1090 | | else |
| 1091 | | try std.fmt.allocPrint( |
| 1092 | | arena, |
| 1093 | | "{s}_GLIBC_{d}_{d}_{d}", |
| 1094 | | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 1095 | | ); |
| 1079 | const sym_plus_ver = try std.fmt.allocPrint( |
| 1080 | arena, |
| 1081 | "{s}_{d}_{d}_{d}", |
| 1082 | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 1083 | ); |
| 1096 | 1084 | try stubs_asm.writer().print( |
| 1097 | 1085 | \\.balign {d} |
| 1098 | 1086 | \\.globl {s} |
| 1099 | | \\.type {s}, %object; |
| 1100 | | \\.size {s}, {d}; |
| 1101 | | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d} |
| 1087 | \\.type {s}, %object |
| 1088 | \\.size {s}, {d} |
| 1089 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d}, remove |
| 1102 | 1090 | \\{s}: .fill {d}, 1, 0 |
| 1103 | 1091 | \\ |
| 1104 | 1092 | , .{ |