This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO][PATCH] Generate and use the .debug_str section when compiling with LTO
- From: "William Maddox" <maddox at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "Nathan Froyd" <froydnj at codesourcery dot com>
- Date: Fri, 7 Dec 2007 22:39:51 -0800
- Subject: Re: [LTO][PATCH] Generate and use the .debug_str section when compiling with LTO
- References: <8a0e66f0712072228n4a8d7ce1n1e689b941e8d8701@mail.gmail.com>
On Dec 7, 2007 10:28 PM, William Maddox <maddox@google.com> wrote:
> This patch modifies the LTO reader to read the .debug_str section,
> if present, and to resolve DW_FORM_strp attributes. It also removes
> the workaround in dwarf2out.c for the previous inability of LTO to grok
> string table references.
>
> gcc/
> * dwarf2out.c (AT_string_form): Remove code to suppress
> the use of the DWARF string table.
>
> gcc/lto
> * lto.c (lto_str_fd_init): New function.
> (lto_str_fd_close): New function.
> (lto_file_init): Call lto_str_fd_init.
> (lto_file_close): Call lto_str_fd_close.
> (lto_str_read): New function. Read debug string table.
> (lto_str_lookup): New function. Get string for debug
> string table offset.
> (lto_read_form): Recognize DW_FORM_strp.
> (lto_file_read): Invoke lto_str_read.
>
> * lto-elf.c (lto_elf_file_open): Read raw section data
> for the .debug_str section, if present.
>
> * lto.h (struct lto_str_fd_struct): New struct.
> (struct lto_file_struct): Added new field DEBUG_STR
> to hold the file descriptor for the debug string table.
Committed to LTO branch per approval from Nathan Froyd.
Revision 130706.