[PATCH] elfread.c, record_minimal_symbol_and_info
Elena Zannoni
ezannoni@cygnus.com
Tue May 9 15:33:00 GMT 2000
This patch fixes some problems when adding shared libraries that have
no .data section. I tested this on solaris 2.5, 2.7 and 2.8.
Elena
2000-05-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* elfread.c (record_minimal_symbol_and_info): Use the section
where the symbol lives to get the index, instead of guessing.
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.6
diff -u -p -r1.6 elfread.c
--- elfread.c 2000/05/05 19:09:27 1.6
+++ elfread.c 2000/05/09 22:27:00
@@ -191,18 +191,16 @@ record_minimal_symbol_and_info (name, ad
{
case mst_text:
case mst_file_text:
- section = SECT_OFF_TEXT (objfile);
+ section = bfd_section->index;
#ifdef SMASH_TEXT_ADDRESS
SMASH_TEXT_ADDRESS (address);
#endif
break;
case mst_data:
case mst_file_data:
- section = SECT_OFF_DATA (objfile);
- break;
case mst_bss:
case mst_file_bss:
- section = SECT_OFF_BSS (objfile);
+ section = bfd_section->index;
break;
default:
section = -1;
More information about the Gdb-patches
mailing list