| ... | @@ -7625,11 +7625,15 @@ fn loadObject( | ... | @@ -7625,11 +7625,15 @@ fn loadObject( |
| 7625 | }) catch |err| switch (err) { | 7625 | }) catch |err| switch (err) { |
| 7626 | else => |e| return e, | 7626 | else => |e| return e, |
| 7627 | error.StripSection => continue, | 7627 | error.StripSection => continue, |
| 7628 | error.TlsSectionUnavailable => return diags.failParse( | 7628 | error.TlsSectionUnavailable => { |
| 7629 | path, | 7629 | if (section.shdr.size == 0) continue; |
| 7630 | "thread-local storage section '{s}' is incompatible with '-fsingle-threaded'", | 7630 | |
| 7631 | .{name}, | 7631 | return diags.failParse( |
| 7632 | ), | 7632 | path, |
| | 7633 | "thread-local storage section '{s}' is incompatible with '-fsingle-threaded'", |
| | 7634 | .{name}, |
| | 7635 | ); |
| | 7636 | }, |
| 7633 | error.UnsupportedSectionFlags => if (!section.shdr.flags.shf.ALLOC) { | 7637 | error.UnsupportedSectionFlags => if (!section.shdr.flags.shf.ALLOC) { |
| 7634 | // It probably doesn't matter, just skip this section. | 7638 | // It probably doesn't matter, just skip this section. |
| 7635 | continue; | 7639 | continue; |