Add a symbol's value to the computed frag offset, rather than overwriting it.
[deliverable/binutils-gdb.git] / gdb / solib.c
index d719837346df86c05f808dee740dbd975eb87a94..93eb06611c10d4910abc5a700d449f54ce481f6e 100644 (file)
@@ -1083,7 +1083,9 @@ 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 section_addrs;
 
+  memset (&section_addrs, 0, sizeof (section_addrs));
   if (so->textsection)
     text_addr = so->textsection->addr;
   else if (so->abfd != NULL)
@@ -1107,10 +1109,10 @@ symbol_add_stub (arg)
     if (strcmp (so->objfile->name, so->so_name) == 0)
       return 1;
   }
+  section_addrs.text_addr = text_addr;
   so->objfile =
     symbol_file_add (so->so_name, so->from_tty,
-                    text_addr,
-                    0, 0, 0, 0, 1);
+                    &section_addrs, 0, OBJF_SHARED);
   return (1);
 }
 
@@ -1275,7 +1277,7 @@ info_sharedlibrary_command (ignore, from_tty)
 
   if (exec_bfd == NULL)
     {
-      printf_unfiltered ("No exec file.\n");
+      printf_unfiltered ("No executable file.\n");
       return;
     }
 
This page took 0.035527 seconds and 4 git commands to generate.