| ... | ... | @@ -95,16 +95,16 @@ pub const File = union(enum) { |
| 95 | 95 | log.debug("'{s}' is non-local", .{sym.name(ef)}); |
| 96 | 96 | try ef.dynsym.addSymbol(ref, ef); |
| 97 | 97 | } |
| 98 | | if (sym.flags.needs_got) { |
| 98 | if (sym.flags.needs_got and !sym.flags.has_got) { |
| 99 | 99 | log.debug("'{s}' needs GOT", .{sym.name(ef)}); |
| 100 | 100 | _ = try ef.got.addGotSymbol(ref, ef); |
| 101 | 101 | } |
| 102 | | if (sym.flags.needs_plt) { |
| 102 | if (sym.flags.needs_plt and !sym.flags.has_plt) { |
| 103 | 103 | if (sym.flags.is_canonical) { |
| 104 | 104 | log.debug("'{s}' needs CPLT", .{sym.name(ef)}); |
| 105 | 105 | sym.flags.@"export" = true; |
| 106 | 106 | try ef.plt.addSymbol(ref, ef); |
| 107 | | } else if (sym.flags.needs_got) { |
| 107 | } else if (sym.flags.needs_got and !sym.flags.has_got) { |
| 108 | 108 | log.debug("'{s}' needs PLTGOT", .{sym.name(ef)}); |
| 109 | 109 | try ef.plt_got.addSymbol(ref, ef); |
| 110 | 110 | } else { |
| ... | ... | @@ -116,15 +116,15 @@ pub const File = union(enum) { |
| 116 | 116 | log.debug("'{s}' needs COPYREL", .{sym.name(ef)}); |
| 117 | 117 | try ef.copy_rel.addSymbol(ref, ef); |
| 118 | 118 | } |
| 119 | | if (sym.flags.needs_tlsgd) { |
| 119 | if (sym.flags.needs_tlsgd and !sym.flags.has_tlsgd) { |
| 120 | 120 | log.debug("'{s}' needs TLSGD", .{sym.name(ef)}); |
| 121 | 121 | try ef.got.addTlsGdSymbol(ref, ef); |
| 122 | 122 | } |
| 123 | | if (sym.flags.needs_gottp) { |
| 123 | if (sym.flags.needs_gottp and !sym.flags.has_gottp) { |
| 124 | 124 | log.debug("'{s}' needs GOTTP", .{sym.name(ef)}); |
| 125 | 125 | try ef.got.addGotTpSymbol(ref, ef); |
| 126 | 126 | } |
| 127 | | if (sym.flags.needs_tlsdesc) { |
| 127 | if (sym.flags.needs_tlsdesc and !sym.flags.has_tlsdesc) { |
| 128 | 128 | log.debug("'{s}' needs TLSDESC", .{sym.name(ef)}); |
| 129 | 129 | try ef.got.addTlsDescSymbol(ref, ef); |
| 130 | 130 | } |