This patch is ported from the google/gcc-4_7 branch. Tested with crosstool_validate.py and committed.
-cary include: 2012-08-20 Sterling Augustine <saugust...@google.com> * gdb/gdb-index.h: Check in from src. gcc: 2012-08-20 Sterling Augustine <saugust...@google.com> * dwarf2out.c (DEBUG_PUBNAMES_SECTION, DEBUG_PUBTYPES_SECTION): Adjust macros. (is_java, include_pubname_in_output): New functions. (size_of_pubnames): Call include_pubname_in_output. New variable space_for_flags. (output_pubnames): Refactor, moving most of the logic to... (output_pubname): ... here. New function. (dwarf2out_finish): Move output pubtable logic to... (output_pubtables): ... here. New function. * common.opt (ggnu-pubnames): New option. (gpubnames, gno-pubnames): Adjust. * opts.c (finish_options): Require -ggnu-pubnames when -gsplit-dwarf is set. * doc/invoke.texi: Document -ggnu-pubnames.