872c8acd1e48f4d6600bac6711b8dc75a1347af0
[deliverable/binutils-gdb.git] / gdb / solib-sunos.c
1 /* Handle SunOS shared libraries for GDB, the GNU Debugger.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
3 2001, 2004
4 Free Software Foundation, Inc.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23 #include "defs.h"
24
25 #include <sys/types.h>
26 #include <signal.h>
27 #include "gdb_string.h"
28 #include <sys/param.h>
29 #include <fcntl.h>
30
31 /* SunOS shared libs need the nlist structure. */
32 #include <a.out.h>
33 #include <link.h>
34
35 #include "symtab.h"
36 #include "bfd.h"
37 #include "symfile.h"
38 #include "objfiles.h"
39 #include "gdbcore.h"
40 #include "inferior.h"
41 #include "solist.h"
42 #include "bcache.h"
43 #include "regcache.h"
44
45 /* Link map info to include in an allocated so_list entry */
46
47 struct lm_info
48 {
49 /* Pointer to copy of link map from inferior. The type is char *
50 rather than void *, so that we may use byte offsets to find the
51 various fields without the need for a cast. */
52 char *lm;
53 };
54
55
56 /* Symbols which are used to locate the base of the link map structures. */
57
58 static char *debug_base_symbols[] =
59 {
60 "_DYNAMIC",
61 "_DYNAMIC__MGC",
62 NULL
63 };
64
65 static char *main_name_list[] =
66 {
67 "main_$main",
68 NULL
69 };
70
71 /* Macro to extract an address from a solib structure. When GDB is
72 configured for some 32-bit targets (e.g. Solaris 2.7 sparc), BFD is
73 configured to handle 64-bit targets, so CORE_ADDR is 64 bits. We
74 have to extract only the significant bits of addresses to get the
75 right address when accessing the core file BFD.
76
77 Assume that the address is unsigned. */
78
79 #define SOLIB_EXTRACT_ADDRESS(MEMBER) \
80 extract_unsigned_integer (&(MEMBER), sizeof (MEMBER))
81
82 /* local data declarations */
83
84 static struct link_dynamic dynamic_copy;
85 static struct link_dynamic_2 ld_2_copy;
86 static struct ld_debug debug_copy;
87 static CORE_ADDR debug_addr;
88 static CORE_ADDR flag_addr;
89
90 #ifndef offsetof
91 #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
92 #endif
93 #define fieldsize(TYPE, MEMBER) (sizeof (((TYPE *)0)->MEMBER))
94
95 /* link map access functions */
96
97 static CORE_ADDR
98 LM_ADDR (struct so_list *so)
99 {
100 int lm_addr_offset = offsetof (struct link_map, lm_addr);
101 int lm_addr_size = fieldsize (struct link_map, lm_addr);
102
103 return (CORE_ADDR) extract_signed_integer (so->lm_info->lm + lm_addr_offset,
104 lm_addr_size);
105 }
106
107 static CORE_ADDR
108 LM_NEXT (struct so_list *so)
109 {
110 int lm_next_offset = offsetof (struct link_map, lm_next);
111 int lm_next_size = fieldsize (struct link_map, lm_next);
112
113 /* Assume that the address is unsigned. */
114 return extract_unsigned_integer (so->lm_info->lm + lm_next_offset,
115 lm_next_size);
116 }
117
118 static CORE_ADDR
119 LM_NAME (struct so_list *so)
120 {
121 int lm_name_offset = offsetof (struct link_map, lm_name);
122 int lm_name_size = fieldsize (struct link_map, lm_name);
123
124 /* Assume that the address is unsigned. */
125 return extract_unsigned_integer (so->lm_info->lm + lm_name_offset,
126 lm_name_size);
127 }
128
129 static CORE_ADDR debug_base; /* Base of dynamic linker structures */
130
131 /* Local function prototypes */
132
133 static int match_main (char *);
134
135 /* Allocate the runtime common object file. */
136
137 static void
138 allocate_rt_common_objfile (void)
139 {
140 struct objfile *objfile;
141 struct objfile *last_one;
142
143 objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
144 memset (objfile, 0, sizeof (struct objfile));
145 objfile->md = NULL;
146 objfile->psymbol_cache = bcache_xmalloc ();
147 objfile->macro_cache = bcache_xmalloc ();
148 obstack_init (&objfile->objfile_obstack);
149 objfile->name = mstrsave (objfile->md, "rt_common");
150
151 /* Add this file onto the tail of the linked list of other such files. */
152
153 objfile->next = NULL;
154 if (object_files == NULL)
155 object_files = objfile;
156 else
157 {
158 for (last_one = object_files;
159 last_one->next;
160 last_one = last_one->next);
161 last_one->next = objfile;
162 }
163
164 rt_common_objfile = objfile;
165 }
166
167 /* Read all dynamically loaded common symbol definitions from the inferior
168 and put them into the minimal symbol table for the runtime common
169 objfile. */
170
171 static void
172 solib_add_common_symbols (CORE_ADDR rtc_symp)
173 {
174 struct rtc_symb inferior_rtc_symb;
175 struct nlist inferior_rtc_nlist;
176 int len;
177 char *name;
178
179 /* Remove any runtime common symbols from previous runs. */
180
181 if (rt_common_objfile != NULL && rt_common_objfile->minimal_symbol_count)
182 {
183 obstack_free (&rt_common_objfile->objfile_obstack, 0);
184 obstack_init (&rt_common_objfile->objfile_obstack);
185 rt_common_objfile->minimal_symbol_count = 0;
186 rt_common_objfile->msymbols = NULL;
187 terminate_minimal_symbol_table (rt_common_objfile);
188 }
189
190 init_minimal_symbol_collection ();
191 make_cleanup_discard_minimal_symbols ();
192
193 while (rtc_symp)
194 {
195 read_memory (rtc_symp,
196 (char *) &inferior_rtc_symb,
197 sizeof (inferior_rtc_symb));
198 read_memory (SOLIB_EXTRACT_ADDRESS (inferior_rtc_symb.rtc_sp),
199 (char *) &inferior_rtc_nlist,
200 sizeof (inferior_rtc_nlist));
201 if (inferior_rtc_nlist.n_type == N_COMM)
202 {
203 /* FIXME: The length of the symbol name is not available, but in the
204 current implementation the common symbol is allocated immediately
205 behind the name of the symbol. */
206 len = inferior_rtc_nlist.n_value - inferior_rtc_nlist.n_un.n_strx;
207
208 name = xmalloc (len);
209 read_memory (SOLIB_EXTRACT_ADDRESS (inferior_rtc_nlist.n_un.n_name),
210 name, len);
211
212 /* Allocate the runtime common objfile if necessary. */
213 if (rt_common_objfile == NULL)
214 allocate_rt_common_objfile ();
215
216 prim_record_minimal_symbol (name, inferior_rtc_nlist.n_value,
217 mst_bss, rt_common_objfile);
218 xfree (name);
219 }
220 rtc_symp = SOLIB_EXTRACT_ADDRESS (inferior_rtc_symb.rtc_next);
221 }
222
223 /* Install any minimal symbols that have been collected as the current
224 minimal symbols for the runtime common objfile. */
225
226 install_minimal_symbols (rt_common_objfile);
227 }
228
229
230 /*
231
232 LOCAL FUNCTION
233
234 locate_base -- locate the base address of dynamic linker structs
235
236 SYNOPSIS
237
238 CORE_ADDR locate_base (void)
239
240 DESCRIPTION
241
242 For both the SunOS and SVR4 shared library implementations, if the
243 inferior executable has been linked dynamically, there is a single
244 address somewhere in the inferior's data space which is the key to
245 locating all of the dynamic linker's runtime structures. This
246 address is the value of the debug base symbol. The job of this
247 function is to find and return that address, or to return 0 if there
248 is no such address (the executable is statically linked for example).
249
250 For SunOS, the job is almost trivial, since the dynamic linker and
251 all of it's structures are statically linked to the executable at
252 link time. Thus the symbol for the address we are looking for has
253 already been added to the minimal symbol table for the executable's
254 objfile at the time the symbol file's symbols were read, and all we
255 have to do is look it up there. Note that we explicitly do NOT want
256 to find the copies in the shared library.
257
258 The SVR4 version is a bit more complicated because the address
259 is contained somewhere in the dynamic info section. We have to go
260 to a lot more work to discover the address of the debug base symbol.
261 Because of this complexity, we cache the value we find and return that
262 value on subsequent invocations. Note there is no copy in the
263 executable symbol tables.
264
265 */
266
267 static CORE_ADDR
268 locate_base (void)
269 {
270 struct minimal_symbol *msymbol;
271 CORE_ADDR address = 0;
272 char **symbolp;
273
274 /* For SunOS, we want to limit the search for the debug base symbol to the
275 executable being debugged, since there is a duplicate named symbol in the
276 shared library. We don't want the shared library versions. */
277
278 for (symbolp = debug_base_symbols; *symbolp != NULL; symbolp++)
279 {
280 msymbol = lookup_minimal_symbol (*symbolp, NULL, symfile_objfile);
281 if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
282 {
283 address = SYMBOL_VALUE_ADDRESS (msymbol);
284 return (address);
285 }
286 }
287 return (0);
288 }
289
290 /*
291
292 LOCAL FUNCTION
293
294 first_link_map_member -- locate first member in dynamic linker's map
295
296 SYNOPSIS
297
298 static CORE_ADDR first_link_map_member (void)
299
300 DESCRIPTION
301
302 Find the first element in the inferior's dynamic link map, and
303 return its address in the inferior. This function doesn't copy the
304 link map entry itself into our address space; current_sos actually
305 does the reading. */
306
307 static CORE_ADDR
308 first_link_map_member (void)
309 {
310 CORE_ADDR lm = 0;
311
312 read_memory (debug_base, (char *) &dynamic_copy, sizeof (dynamic_copy));
313 if (dynamic_copy.ld_version >= 2)
314 {
315 /* It is a version that we can deal with, so read in the secondary
316 structure and find the address of the link map list from it. */
317 read_memory (SOLIB_EXTRACT_ADDRESS (dynamic_copy.ld_un.ld_2),
318 (char *) &ld_2_copy, sizeof (struct link_dynamic_2));
319 lm = SOLIB_EXTRACT_ADDRESS (ld_2_copy.ld_loaded);
320 }
321 return (lm);
322 }
323
324 static int
325 open_symbol_file_object (void *from_ttyp)
326 {
327 return 1;
328 }
329
330
331 /* LOCAL FUNCTION
332
333 current_sos -- build a list of currently loaded shared objects
334
335 SYNOPSIS
336
337 struct so_list *current_sos ()
338
339 DESCRIPTION
340
341 Build a list of `struct so_list' objects describing the shared
342 objects currently loaded in the inferior. This list does not
343 include an entry for the main executable file.
344
345 Note that we only gather information directly available from the
346 inferior --- we don't examine any of the shared library files
347 themselves. The declaration of `struct so_list' says which fields
348 we provide values for. */
349
350 static struct so_list *
351 sunos_current_sos (void)
352 {
353 CORE_ADDR lm;
354 struct so_list *head = 0;
355 struct so_list **link_ptr = &head;
356 int errcode;
357 char *buffer;
358
359 /* Make sure we've looked up the inferior's dynamic linker's base
360 structure. */
361 if (! debug_base)
362 {
363 debug_base = locate_base ();
364
365 /* If we can't find the dynamic linker's base structure, this
366 must not be a dynamically linked executable. Hmm. */
367 if (! debug_base)
368 return 0;
369 }
370
371 /* Walk the inferior's link map list, and build our list of
372 `struct so_list' nodes. */
373 lm = first_link_map_member ();
374 while (lm)
375 {
376 struct so_list *new
377 = (struct so_list *) xmalloc (sizeof (struct so_list));
378 struct cleanup *old_chain = make_cleanup (xfree, new);
379
380 memset (new, 0, sizeof (*new));
381
382 new->lm_info = xmalloc (sizeof (struct lm_info));
383 make_cleanup (xfree, new->lm_info);
384
385 new->lm_info->lm = xmalloc (sizeof (struct link_map));
386 make_cleanup (xfree, new->lm_info->lm);
387 memset (new->lm_info->lm, 0, sizeof (struct link_map));
388
389 read_memory (lm, new->lm_info->lm, sizeof (struct link_map));
390
391 lm = LM_NEXT (new);
392
393 /* Extract this shared object's name. */
394 target_read_string (LM_NAME (new), &buffer,
395 SO_NAME_MAX_PATH_SIZE - 1, &errcode);
396 if (errcode != 0)
397 {
398 warning ("current_sos: Can't read pathname for load map: %s\n",
399 safe_strerror (errcode));
400 }
401 else
402 {
403 strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
404 new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
405 xfree (buffer);
406 strcpy (new->so_original_name, new->so_name);
407 }
408
409 /* If this entry has no name, or its name matches the name
410 for the main executable, don't include it in the list. */
411 if (! new->so_name[0]
412 || match_main (new->so_name))
413 free_so (new);
414 else
415 {
416 new->next = 0;
417 *link_ptr = new;
418 link_ptr = &new->next;
419 }
420
421 discard_cleanups (old_chain);
422 }
423
424 return head;
425 }
426
427
428 /* On some systems, the only way to recognize the link map entry for
429 the main executable file is by looking at its name. Return
430 non-zero iff SONAME matches one of the known main executable names. */
431
432 static int
433 match_main (char *soname)
434 {
435 char **mainp;
436
437 for (mainp = main_name_list; *mainp != NULL; mainp++)
438 {
439 if (strcmp (soname, *mainp) == 0)
440 return (1);
441 }
442
443 return (0);
444 }
445
446
447 static int
448 sunos_in_dynsym_resolve_code (CORE_ADDR pc)
449 {
450 return 0;
451 }
452
453 /*
454
455 LOCAL FUNCTION
456
457 disable_break -- remove the "mapping changed" breakpoint
458
459 SYNOPSIS
460
461 static int disable_break ()
462
463 DESCRIPTION
464
465 Removes the breakpoint that gets hit when the dynamic linker
466 completes a mapping change.
467
468 */
469
470 static int
471 disable_break (void)
472 {
473 CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
474
475 int in_debugger = 0;
476
477 /* Read the debugger structure from the inferior to retrieve the
478 address of the breakpoint and the original contents of the
479 breakpoint address. Remove the breakpoint by writing the original
480 contents back. */
481
482 read_memory (debug_addr, (char *) &debug_copy, sizeof (debug_copy));
483
484 /* Set `in_debugger' to zero now. */
485
486 write_memory (flag_addr, (char *) &in_debugger, sizeof (in_debugger));
487
488 breakpoint_addr = SOLIB_EXTRACT_ADDRESS (debug_copy.ldd_bp_addr);
489 write_memory (breakpoint_addr, (char *) &debug_copy.ldd_bp_inst,
490 sizeof (debug_copy.ldd_bp_inst));
491
492 /* For the SVR4 version, we always know the breakpoint address. For the
493 SunOS version we don't know it until the above code is executed.
494 Grumble if we are stopped anywhere besides the breakpoint address. */
495
496 if (stop_pc != breakpoint_addr)
497 {
498 warning ("stopped at unknown breakpoint while handling shared libraries");
499 }
500
501 return 1;
502 }
503
504
505 /*
506
507 LOCAL FUNCTION
508
509 enable_break -- arrange for dynamic linker to hit breakpoint
510
511 SYNOPSIS
512
513 int enable_break (void)
514
515 DESCRIPTION
516
517 Both the SunOS and the SVR4 dynamic linkers have, as part of their
518 debugger interface, support for arranging for the inferior to hit
519 a breakpoint after mapping in the shared libraries. This function
520 enables that breakpoint.
521
522 For SunOS, there is a special flag location (in_debugger) which we
523 set to 1. When the dynamic linker sees this flag set, it will set
524 a breakpoint at a location known only to itself, after saving the
525 original contents of that place and the breakpoint address itself,
526 in it's own internal structures. When we resume the inferior, it
527 will eventually take a SIGTRAP when it runs into the breakpoint.
528 We handle this (in a different place) by restoring the contents of
529 the breakpointed location (which is only known after it stops),
530 chasing around to locate the shared libraries that have been
531 loaded, then resuming.
532
533 For SVR4, the debugger interface structure contains a member (r_brk)
534 which is statically initialized at the time the shared library is
535 built, to the offset of a function (_r_debug_state) which is guaran-
536 teed to be called once before mapping in a library, and again when
537 the mapping is complete. At the time we are examining this member,
538 it contains only the unrelocated offset of the function, so we have
539 to do our own relocation. Later, when the dynamic linker actually
540 runs, it relocates r_brk to be the actual address of _r_debug_state().
541
542 The debugger interface structure also contains an enumeration which
543 is set to either RT_ADD or RT_DELETE prior to changing the mapping,
544 depending upon whether or not the library is being mapped or unmapped,
545 and then set to RT_CONSISTENT after the library is mapped/unmapped.
546 */
547
548 static int
549 enable_break (void)
550 {
551 int success = 0;
552 int j;
553 int in_debugger;
554
555 /* Get link_dynamic structure */
556
557 j = target_read_memory (debug_base, (char *) &dynamic_copy,
558 sizeof (dynamic_copy));
559 if (j)
560 {
561 /* unreadable */
562 return (0);
563 }
564
565 /* Calc address of debugger interface structure */
566
567 debug_addr = SOLIB_EXTRACT_ADDRESS (dynamic_copy.ldd);
568
569 /* Calc address of `in_debugger' member of debugger interface structure */
570
571 flag_addr = debug_addr + (CORE_ADDR) ((char *) &debug_copy.ldd_in_debugger -
572 (char *) &debug_copy);
573
574 /* Write a value of 1 to this member. */
575
576 in_debugger = 1;
577 write_memory (flag_addr, (char *) &in_debugger, sizeof (in_debugger));
578 success = 1;
579
580 return (success);
581 }
582
583 /*
584
585 LOCAL FUNCTION
586
587 special_symbol_handling -- additional shared library symbol handling
588
589 SYNOPSIS
590
591 void special_symbol_handling ()
592
593 DESCRIPTION
594
595 Once the symbols from a shared object have been loaded in the usual
596 way, we are called to do any system specific symbol handling that
597 is needed.
598
599 For SunOS4, this consists of grunging around in the dynamic
600 linkers structures to find symbol definitions for "common" symbols
601 and adding them to the minimal symbol table for the runtime common
602 objfile.
603
604 */
605
606 static void
607 sunos_special_symbol_handling (void)
608 {
609 int j;
610
611 if (debug_addr == 0)
612 {
613 /* Get link_dynamic structure */
614
615 j = target_read_memory (debug_base, (char *) &dynamic_copy,
616 sizeof (dynamic_copy));
617 if (j)
618 {
619 /* unreadable */
620 return;
621 }
622
623 /* Calc address of debugger interface structure */
624 /* FIXME, this needs work for cross-debugging of core files
625 (byteorder, size, alignment, etc). */
626
627 debug_addr = SOLIB_EXTRACT_ADDRESS (dynamic_copy.ldd);
628 }
629
630 /* Read the debugger structure from the inferior, just to make sure
631 we have a current copy. */
632
633 j = target_read_memory (debug_addr, (char *) &debug_copy,
634 sizeof (debug_copy));
635 if (j)
636 return; /* unreadable */
637
638 /* Get common symbol definitions for the loaded object. */
639
640 if (debug_copy.ldd_cp)
641 {
642 solib_add_common_symbols (SOLIB_EXTRACT_ADDRESS (debug_copy.ldd_cp));
643 }
644 }
645
646 /*
647
648 GLOBAL FUNCTION
649
650 sunos_solib_create_inferior_hook -- shared library startup support
651
652 SYNOPSIS
653
654 void sunos_solib_create_inferior_hook()
655
656 DESCRIPTION
657
658 When gdb starts up the inferior, it nurses it along (through the
659 shell) until it is ready to execute it's first instruction. At this
660 point, this function gets called via expansion of the macro
661 SOLIB_CREATE_INFERIOR_HOOK.
662
663 For SunOS executables, this first instruction is typically the
664 one at "_start", or a similar text label, regardless of whether
665 the executable is statically or dynamically linked. The runtime
666 startup code takes care of dynamically linking in any shared
667 libraries, once gdb allows the inferior to continue.
668
669 For SVR4 executables, this first instruction is either the first
670 instruction in the dynamic linker (for dynamically linked
671 executables) or the instruction at "start" for statically linked
672 executables. For dynamically linked executables, the system
673 first exec's /lib/libc.so.N, which contains the dynamic linker,
674 and starts it running. The dynamic linker maps in any needed
675 shared libraries, maps in the actual user executable, and then
676 jumps to "start" in the user executable.
677
678 For both SunOS shared libraries, and SVR4 shared libraries, we
679 can arrange to cooperate with the dynamic linker to discover the
680 names of shared libraries that are dynamically linked, and the
681 base addresses to which they are linked.
682
683 This function is responsible for discovering those names and
684 addresses, and saving sufficient information about them to allow
685 their symbols to be read at a later time.
686
687 FIXME
688
689 Between enable_break() and disable_break(), this code does not
690 properly handle hitting breakpoints which the user might have
691 set in the startup code or in the dynamic linker itself. Proper
692 handling will probably have to wait until the implementation is
693 changed to use the "breakpoint handler function" method.
694
695 Also, what if child has exit()ed? Must exit loop somehow.
696 */
697
698 static void
699 sunos_solib_create_inferior_hook (void)
700 {
701 if ((debug_base = locate_base ()) == 0)
702 {
703 /* Can't find the symbol or the executable is statically linked. */
704 return;
705 }
706
707 if (!enable_break ())
708 {
709 warning ("shared library handler failed to enable breakpoint");
710 return;
711 }
712
713 /* SCO and SunOS need the loop below, other systems should be using the
714 special shared library breakpoints and the shared library breakpoint
715 service routine.
716
717 Now run the target. It will eventually hit the breakpoint, at
718 which point all of the libraries will have been mapped in and we
719 can go groveling around in the dynamic linker structures to find
720 out what we need to know about them. */
721
722 clear_proceed_status ();
723 stop_soon = STOP_QUIETLY;
724 stop_signal = TARGET_SIGNAL_0;
725 do
726 {
727 target_resume (pid_to_ptid (-1), 0, stop_signal);
728 wait_for_inferior ();
729 }
730 while (stop_signal != TARGET_SIGNAL_TRAP);
731 stop_soon = NO_STOP_QUIETLY;
732
733 /* We are now either at the "mapping complete" breakpoint (or somewhere
734 else, a condition we aren't prepared to deal with anyway), so adjust
735 the PC as necessary after a breakpoint, disable the breakpoint, and
736 add any shared libraries that were mapped in. */
737
738 if (DECR_PC_AFTER_BREAK)
739 {
740 stop_pc -= DECR_PC_AFTER_BREAK;
741 write_register (PC_REGNUM, stop_pc);
742 }
743
744 if (!disable_break ())
745 {
746 warning ("shared library handler failed to disable breakpoint");
747 }
748
749 solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
750 }
751
752 static void
753 sunos_clear_solib (void)
754 {
755 debug_base = 0;
756 }
757
758 static void
759 sunos_free_so (struct so_list *so)
760 {
761 xfree (so->lm_info->lm);
762 xfree (so->lm_info);
763 }
764
765 static void
766 sunos_relocate_section_addresses (struct so_list *so,
767 struct section_table *sec)
768 {
769 sec->addr += LM_ADDR (so);
770 sec->endaddr += LM_ADDR (so);
771 }
772
773 static struct target_so_ops sunos_so_ops;
774
775 void
776 _initialize_sunos_solib (void)
777 {
778 sunos_so_ops.relocate_section_addresses = sunos_relocate_section_addresses;
779 sunos_so_ops.free_so = sunos_free_so;
780 sunos_so_ops.clear_solib = sunos_clear_solib;
781 sunos_so_ops.solib_create_inferior_hook = sunos_solib_create_inferior_hook;
782 sunos_so_ops.special_symbol_handling = sunos_special_symbol_handling;
783 sunos_so_ops.current_sos = sunos_current_sos;
784 sunos_so_ops.open_symbol_file_object = open_symbol_file_object;
785 sunos_so_ops.in_dynsym_resolve_code = sunos_in_dynsym_resolve_code;
786
787 /* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */
788 current_target_so_ops = &sunos_so_ops;
789 }
This page took 0.069091 seconds and 4 git commands to generate.