summaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-11 00:36:17 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-11 00:36:17 +0000
commitb53f36d03b05021189af70ab25958522eeab078e (patch)
treea40748fa156be0b447e77af9d0945a6b5e1e328c /gdb/elfread.c
parentb3ab03cc67217bd3e72fec895fcd2e1813d2e821 (diff)
downloadgdb-b53f36d03b05021189af70ab25958522eeab078e.tar.gz
2000-05-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* solib.c (symbol_add_stub): Remember the index and the name of the section with the lowest address. Use this data (instead of data from .text) to pass info into symbol_file_add. * elfread.c (record_minimal_symbol_and_info): Use the section where the symbol lives to get the index, instead of guessing.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 85b04ec7bbe..60f7988029b 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -191,18 +191,16 @@ record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
{
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;