Message ID | 20120109221849.8A179160CF0@sterling.mtv.corp.google.com |
---|---|
State | New |
Headers | show |
> Certain source files will not produce a .debug_info section. This patch to > google/main adds a check for that case to output_pubnames, preventing a link > failure. > > Tested: > By rebuild and bootstrap. > > ChangeLog: > > 2012-01-09 Sterling Augustine <saugustine@google.com> > > * gcc/dwarf2out.c (output_pubnames): Add check for info_section_emitted. LGTM. -cary
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 3788cf8..57f18ad 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8754,7 +8754,7 @@ output_pubnames (VEC (pubname_entry, gc) * names) unsigned long pubnames_length = size_of_pubnames (names); pubname_ref pub; - if (!targetm.want_debug_pub_sections) + if (!targetm.want_debug_pub_sections || !info_section_emitted) return; if (names == pubname_table) {