diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-03-21 22:37:42 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-03-21 22:37:42 +0000 |
commit | 62557bbcee534198d6ff23d66d912ba256c94def (patch) | |
tree | 20190c6ef07b0f4b6979f0390bffa99a75a1e6ed /gdb/solib.c | |
parent | cb7450ea08c85f5d26149350a403666a25296ecc (diff) | |
download | gdb-62557bbcee534198d6ff23d66d912ba256c94def.zip gdb-62557bbcee534198d6ff23d66d912ba256c94def.tar.gz gdb-62557bbcee534198d6ff23d66d912ba256c94def.tar.bz2 |
Make sure section addresses from a shared object are correctly set in
a new struct objfile.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r-- | gdb/solib.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/solib.c b/gdb/solib.c index edfcb22..621bd6c 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -1155,6 +1155,7 @@ symbol_add_stub (arg) { register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */ CORE_ADDR text_addr = 0; + struct section_addr_info *sap; /* Have we already loaded this shared object? */ ALL_OBJFILES (so->objfile) @@ -1181,15 +1182,12 @@ symbol_add_stub (arg) + LM_ADDR (so); } - { - struct section_addr_info section_addrs; - - memset (§ion_addrs, 0, sizeof (section_addrs)); - section_addrs.text_addr = text_addr; - - so->objfile = symbol_file_add (so->so_name, so->from_tty, - §ion_addrs, 0, OBJF_SHARED); - } + sap = build_section_addr_info_from_section_table (so->sections, + so->sections_end); + sap->text_addr = text_addr; + so->objfile = symbol_file_add (so->so_name, so->from_tty, + sap, 0, OBJF_SHARED); + free_section_addr_info (sap); return (1); } |