[commit] Fix warning from separate debug files
Daniel Jacobowitz
dan@codesourcery.com
Thu Feb 25 15:43:00 GMT 2010
My recent patch enabling find_lowest_section unconditionally caused a
warning:
warning: no loadable sections found in added symbol-file .../libgcc_s.so.1.debug
This did not show up when I tested on x86_64, because the lowest
section in the debug files on my desktop is .note.gnu.build-id, which
is loadable in both regular and separate debuginfo files. The ARM
tools I'm testing do not use build-id yet.
As with another recently fixed location in symfile.c, the SEC_LOAD
check should be SEC_LOAD | SEC_ALLOC. The warning goes away, and now
the offsets are correct.
Also tested on x86_64-linux. Checked in.
--
Daniel Jacobowitz
CodeSourcery
2010-02-25 Daniel Jacobowitz <dan@codesourcery.com>
* symfile.c (find_lowest_section): Include SEC_ALLOC sections.
Index: symfile.c
===================================================================
--- symfile.c (revision 276825)
+++ symfile.c (working copy)
@@ -297,7 +297,7 @@ find_lowest_section (bfd *abfd, asection
{
asection **lowest = (asection **) obj;
- if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD))
+ if (0 == (bfd_get_section_flags (abfd, sect) & (SEC_ALLOC | SEC_LOAD)))
return;
if (!*lowest)
*lowest = sect; /* First loadable section */
More information about the Gdb-patches
mailing list