From f552e90295583446b81a07dcdbad9cd85299ec93 Mon Sep 17 00:00:00 2001 From: Robert Guthrie Date: Fri, 4 Oct 2024 23:50:52 -0500 Subject: Add to GDB manual information about building index with 'gold' * gdb/doc/gdb.texinfo (Index Files): New subsection about building the index using 'gold'. Copyright-paperwork-exempt: yes --- gdb/doc/gdb.texinfo | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gdb') diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 46ca62e..554608d 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -22865,6 +22865,19 @@ Print the number of cache hits and misses since the launch of @value{GDBN}. @end table +@subsection Building the index with GNU @command{gold} + +The GNU @command{gold} linker can write the index at link time into +the resulting ELF file, by passing the @command{--gdb-index} flag to +@command{gold}. + +This is especially helpful if you intend to build a program and immediately +run it under @value{GDBN}. You may find that it is faster overall for +the linker to write the index while it has the relevant information in +memory anyways, rather than re-reloading the data from disk with +@command{gdb-add-index}, or debugging the program without an index at +all, especially for large programs. + @node Debug Names @section Extensions to @samp{.debug_names} @cindex index files -- cgit v1.1