This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LTO][PATCH] Generate and use the .debug_str section when compiling with LTO


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]