aboutsummaryrefslogtreecommitdiff
path: root/bfd/simple.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-06 08:15:58 +0000
committerNick Clifton <nickc@redhat.com>2003-04-06 08:15:58 +0000
commit8e16317ca5eb77f3d568598ea1afebb2f52d949a (patch)
tree7d477079271a3ee4d9d6909c4c4d28c9ec52932a /bfd/simple.c
parent5a7a0b7bf98b702f8caf3e599e6eeb6631a50680 (diff)
downloadfsf-binutils-gdb-8e16317ca5eb77f3d568598ea1afebb2f52d949a.zip
fsf-binutils-gdb-8e16317ca5eb77f3d568598ea1afebb2f52d949a.tar.gz
fsf-binutils-gdb-8e16317ca5eb77f3d568598ea1afebb2f52d949a.tar.bz2
(bfd_simple_get_relocated_section_contents): Disable free that leads to GDB
vs BFD memory corruption.
Diffstat (limited to 'bfd/simple.c')
-rw-r--r--bfd/simple.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/simple.c b/bfd/simple.c
index a91d118..a247f11 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -261,8 +261,19 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
if (contents == NULL && data != NULL)
free (data);
+#if 0
+ /* NOTE: cagney/2003-04-05: This free, which was introduced on
+ 2003-03-31 to stop a memory leak, caused a memory corruption
+ between GDB and BFD. The problem, which is stabs specific, can
+ be identified by a bunch of failures in relocate.exp vis:
+
+ gdb.base/relocate.exp: get address of static_bar
+
+ Details of the problem can be found on the binutils@ mailing
+ list, see the discussion thread: "gdb.mi/mi-cli.exp failures". */
if (storage_needed != 0)
free (symbol_table);
+#endif
bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
free (saved_offsets);