| ... | ... | @@ -935,6 +935,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 935 | 935 | var ver_buf_i: u8 = 0; |
| 936 | 936 | while (ver_buf_i < versions_len) : (ver_buf_i += 1) { |
| 937 | 937 | // Example: |
| 938 | // .balign 4 |
| 938 | 939 | // .globl _Exit_2_2_5 |
| 939 | 940 | // .type _Exit_2_2_5, %function; |
| 940 | 941 | // .symver _Exit_2_2_5, _Exit@@GLIBC_2.2.5 |
| ... | ... | @@ -957,12 +958,14 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 957 | 958 | .{ sym_name, ver.major, ver.minor }, |
| 958 | 959 | ); |
| 959 | 960 | try stubs_asm.writer().print( |
| 961 | \\.balign {d} |
| 960 | 962 | \\.globl {s} |
| 961 | 963 | \\.type {s}, %function; |
| 962 | 964 | \\.symver {s}, {s}{s}GLIBC_{d}.{d} |
| 963 | 965 | \\{s}: {s} 0 |
| 964 | 966 | \\ |
| 965 | 967 | , .{ |
| 968 | target.ptrBitWidth() / 8, |
| 966 | 969 | sym_plus_ver, |
| 967 | 970 | sym_plus_ver, |
| 968 | 971 | sym_plus_ver, |
| ... | ... | @@ -983,12 +986,14 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 983 | 986 | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 984 | 987 | ); |
| 985 | 988 | try stubs_asm.writer().print( |
| 989 | \\.balign {d} |
| 986 | 990 | \\.globl {s} |
| 987 | 991 | \\.type {s}, %function; |
| 988 | 992 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d} |
| 989 | 993 | \\{s}: {s} 0 |
| 990 | 994 | \\ |
| 991 | 995 | , .{ |
| 996 | target.ptrBitWidth() / 8, |
| 992 | 997 | sym_plus_ver, |
| 993 | 998 | sym_plus_ver, |
| 994 | 999 | sym_plus_ver, |
| ... | ... | @@ -1026,10 +1031,14 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1026 | 1031 | // a strong reference. |
| 1027 | 1032 | if (std.mem.eql(u8, lib.name, "c")) { |
| 1028 | 1033 | try stubs_asm.writer().print( |
| 1034 | \\.balign {d} |
| 1029 | 1035 | \\.globl _IO_stdin_used |
| 1030 | 1036 | \\{s} _IO_stdin_used |
| 1031 | 1037 | \\ |
| 1032 | | , .{wordDirective(target)}); |
| 1038 | , .{ |
| 1039 | target.ptrBitWidth() / 8, |
| 1040 | wordDirective(target), |
| 1041 | }); |
| 1033 | 1042 | } |
| 1034 | 1043 | |
| 1035 | 1044 | const obj_inclusions_len = try inc_reader.readInt(u16, .little); |
| ... | ... | @@ -1101,6 +1110,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1101 | 1110 | var ver_buf_i: u8 = 0; |
| 1102 | 1111 | while (ver_buf_i < versions_len) : (ver_buf_i += 1) { |
| 1103 | 1112 | // Example: |
| 1113 | // .balign 4 |
| 1104 | 1114 | // .globl environ_2_2_5 |
| 1105 | 1115 | // .type environ_2_2_5, %object; |
| 1106 | 1116 | // .size environ_2_2_5, 4; |
| ... | ... | @@ -1124,6 +1134,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1124 | 1134 | .{ sym_name, ver.major, ver.minor }, |
| 1125 | 1135 | ); |
| 1126 | 1136 | try stubs_asm.writer().print( |
| 1137 | \\.balign {d} |
| 1127 | 1138 | \\.globl {s} |
| 1128 | 1139 | \\.type {s}, %object; |
| 1129 | 1140 | \\.size {s}, {d}; |
| ... | ... | @@ -1131,6 +1142,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1131 | 1142 | \\{s}: .fill {d}, 1, 0 |
| 1132 | 1143 | \\ |
| 1133 | 1144 | , .{ |
| 1145 | target.ptrBitWidth() / 8, |
| 1134 | 1146 | sym_plus_ver, |
| 1135 | 1147 | sym_plus_ver, |
| 1136 | 1148 | sym_plus_ver, |
| ... | ... | @@ -1153,6 +1165,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1153 | 1165 | .{ sym_name, ver.major, ver.minor, ver.patch }, |
| 1154 | 1166 | ); |
| 1155 | 1167 | try stubs_asm.writer().print( |
| 1168 | \\.balign {d} |
| 1156 | 1169 | \\.globl {s} |
| 1157 | 1170 | \\.type {s}, %object; |
| 1158 | 1171 | \\.size {s}, {d}; |
| ... | ... | @@ -1160,6 +1173,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi |
| 1160 | 1173 | \\{s}: .fill {d}, 1, 0 |
| 1161 | 1174 | \\ |
| 1162 | 1175 | , .{ |
| 1176 | target.ptrBitWidth() / 8, |
| 1163 | 1177 | sym_plus_ver, |
| 1164 | 1178 | sym_plus_ver, |
| 1165 | 1179 | sym_plus_ver, |