2009-03-16 Andrew Stubbs <ams@codesourcery.com>
authorAndrew Stubbs <andrew.stubbs@st.com>
Mon, 16 Mar 2009 12:41:26 +0000 (12:41 +0000)
committerAndrew Stubbs <andrew.stubbs@st.com>
Mon, 16 Mar 2009 12:41:26 +0000 (12:41 +0000)
* dwarf2.c (read_section): Always use rawsize, if available.

ChangeLog
bfd/dwarf2.c

index 5ee93843751ce6b802de0e379bb58745af94ba9e..627c584397349d3b26103992a6934c76a0426320 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-16  Andrew Stubbs  <ams@codesourcery.com>
+
+       * dwarf2.c (read_section): Always use rawsize, if available.
+
 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Backport from git Libtool:
index 40b83b717518b9d121f7570c4e334e402f70b9c1..05b13041e0a240f4c6ff722fd257d834e9ffc507 100644 (file)
@@ -432,9 +432,9 @@ read_section (bfd *           abfd,
          return FALSE;
        }
 
+      *section_size = msec->rawsize ? msec->rawsize : msec->size;
       if (syms)
        {
-         *section_size = msec->size;
          *section_buffer
              = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms);
          if (! *section_buffer)
@@ -442,7 +442,6 @@ read_section (bfd *           abfd,
        }
       else
        {
-         *section_size = msec->rawsize ? msec->rawsize : msec->size;
          *section_buffer = bfd_malloc (*section_size);
          if (! *section_buffer)
            return FALSE;