home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5750 < prev    next >
Encoding:
Text File  |  1992-08-22  |  1.6 KB  |  58 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!zrz.tu-berlin.de!opal.cs.tu-berlin.de!mauriti
  3. From: mauriti@cs.tu-berlin.de (Frank Hartlep)
  4. Subject: PLEASE help me with rld! PLEASE! PLEASE! PLEASE! PLEASE! PLEASE! 
  5. Message-ID: <HRA6NUH@mailgzrz.tu-berlin.de>
  6. Keywords: PLEASE! PLEASE! PLEASE! PLEASE! PLEASE!  PLEASE!  PLEASE!  PLEASE!
  7. Sender: news@mailgzrz.tu-berlin.de (News Manager)
  8. Nntp-Posting-Host: beauvoir.cs.tu-berlin.de
  9. Organization: Technical University of Berlin, Germany
  10. Date: Sat, 22 Aug 1992 13:28:51 GMT
  11. Lines: 45
  12.  
  13. I've asked this already and nobody replied. But I can't believe there's
  14. nobody on this big, big net who knows how to use rld.
  15.  
  16. Take a look at this code ...
  17.  
  18.  
  19. --- loader.c
  20. #include <rld.h>
  21. #include <stdio.h>
  22.  
  23. main ()
  24. {
  25.         char    *ObjectFiles [] = {"to_be_loaded.o", NULL};
  26.         int     Status;
  27.  
  28.         rld_load_basefile (NULL, "loader.o");
  29.         Status = rld_load (NULL, NULL, ObjectFiles, NULL);
  30.         fprintf (stderr, "rld returned %d", Status);
  31.         LoadedFunction ("It works!");
  32. }
  33.  
  34. ---- to_be_loaded.c
  35. #include <stdio.h>
  36.  
  37. LoadedFunction (char *Text)
  38. {
  39.         fprintf (stderr, "%s", Text);
  40. }
  41.  
  42.  
  43. ---  Compiled with this:
  44. cc -g -Wall -c loader.c
  45. ld -o loader.gdb loader.o /lib/crt0.o /lib/libsys_s.a -U _LoadedFunction
  46. cc -g -Wall -c to_be_loaded.c
  47.  
  48.  
  49. ... and PLEASE!  PLEASE!  PLEASE!  PLEASE! tell me what's wrong with it.
  50. Loader should load to_be_loaded.o and execute LoadedFunction.
  51. Sounds easy, but why does it fail in rld_load_basefile (with a
  52. floating point exception in NXCreateZone, as the debugger tells me)???
  53.  
  54. ANY info is welcome !
  55.  
  56. Thanks,
  57. Frank
  58.