428:
record and the next text record. If relocation is finished before the next record, the NOP CCW following the Read will be changed to a TIC, and loading and relocating will proceed using the next buffer; if not, then the channel will stop at the NOP CCW, until it is restarted by IEWFETCH via another special IOS exit. The three buffers are in a continuous circular queue, each pointing to its next, and the last pointing to the first, and three buffers are constantly reused as loading and relocating proceeds.
470:
43:
403:(the always resident portion of the Supervisor) itself is formatted in a way that is compatible with a stripped-down version of IEWFETCH. Unlike normal executables, the OS's nucleus is "scatter loaded": parts of the nucleus are loaded into different portions of memory; in particular, certain system tables are required to reside below the initial 64 KB, while other tables and code may reside elsewhere.
356:, which adjust addresses (pointers) in the executable to compensate for variations in the address at which loading starts. The operating systems that need relocating loaders are those in which a program is not always loaded into the same location in the (virtual) address space and in which pointers are absolute addresses rather than offsets from the program's
392:, and it is theoretically possible to load and to relocate an entire executable within one revolution of the DASD media (about 16.6 ms maximum, 8.3 ms average, on "legacy" 3,600 rpm drives). For load modules which exceed a track in size, it is also possible to load and to relocate the entire module without losing a revolution of the media.
199:.) The virtual memory subsystem is then made aware that pages with that region of memory need to be filled on demand if and when program execution actually hits those areas of unfilled memory. This may mean parts of a program's code are not actually copied into memory until they are actually used, and unused code may never be loaded into memory at all.
384:
In OS/360 and descendant systems, the (privileged) operating system facility is called IEWFETCH, and is an internal component of the OS Supervisor, whereas the (non-privileged) LOADER application can perform many of the same functions, plus those of the
Linkage Editor, and is entirely external to the
194:
In the case of operating systems that support virtual memory, the loader may not actually copy the contents of executable files into memory, but rather may simply declare to the virtual memory subsystem that there is a mapping between a region of memory allocated to contain the running program's code
418:
The text records are usually very large; the relocation and/or control records are small as IEWFETCH's three relocation and/or control record buffers are fixed at 260 bytes (smaller relocation and/or control records are certainly possible, but 260 bytes is the maximum possible, and IEWL ensures that
457:
Where such shared libraries can be shared by multiple processes, with only one single copy of the shared code possibly appearing at a different (virtual) address in each process's address space, the code in the shared library is required to be relocatable, ie the library must only use self-relative
422:
A special byte within the relocation and/or control record buffer is used as a "disabled bit spin" communication area, and is initialized to a unique value. The Read CCW for that relocation and/or control record has the
Program Controlled Interrupt bit set. The processor is thereby notified when
427:
exit. At this point the processor enters the "disabled bit spin" loop (sometimes called "the shortest loop in the world"). Once that byte changes from its initialized value, the CPU exits the bit spin, and relocation occurs, during the "gap" within the media between the relocation and/or control
410:
application is named IEWL. IEWL's main function is to associate load modules (executable programs) and object modules (the output from, say, assemblers and compilers), including "automatic calls" to libraries (high-level language "built-in functions"), into a format which may be most efficiently
419:
this limitation is complied with, by inserting additional relocation records, as required, before the next text record, if necessary; in this special case, the sequence of records may be: ..., text record, relocation record, ..., control record, text record, ...).
395:
IEWFETCH also incorporates facilities for so-called overlay structures, and which facilitates running potentially very large executables in a minimum memory model (as small as 44 KB on some versions of the OS, but 88 KB and 128 KB are more common).
414:
The load module format includes an initial "text record", followed immediately by the "relocation and/or control record" for that text record, followed by more instances of text record and relocation and/or control record pairs, until the end of the module.
167:
containing the program instructions into memory, and then carrying out other required preparatory tasks to prepare the executable for running. Once loading is complete, the operating system starts the program by passing control to the loaded program code.
159:. It is one of the essential stages in the process of starting a program, as it places programs into memory and prepares them for execution. Loading a program involves either
661:
458:
or code segment base-relative internal addresses throughout. Some processor have instructions that can use self-relative code-references in order to facilitate this.
171:
All operating systems that support program loading have loaders, apart from highly specialized computer systems that only have a fixed set of specialized programs.
641:
698:
175:
typically do not have loaders, and instead, the code executes directly from ROM or similar. In order to load the operating system itself, as part of
411:
loaded by IEWFETCH. There are a large number of editing options, but for a conventional application only a few of these are commonly employed.
691:
107:
684:
79:
183:
is used. In many operating systems, the loader resides permanently in memory, though some operating systems that support
60:
86:
860:
126:
93:
431:
IEWFETCH can, thereby, load and relocate a load module of any practical size, and in the minimum possible time.
447:
64:
564:
504:
75:
707:
865:
499:
475:
212:
812:
407:
807:
776:
400:
288:
17:
615:
724:
424:
53:
781:
389:
100:
484:
240:
791:
529:
451:
320:
8:
756:
739:
539:
156:
822:
729:
544:
302:
247:
229:
196:
160:
839:
676:
594:
353:
262:
817:
569:
509:
443:
278:
152:
148:
549:
524:
514:
172:
827:
771:
744:
579:
574:
519:
494:
439:
373:
184:
854:
761:
584:
751:
357:
309:
786:
766:
620:
The Open Group Base
Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
233:
216:
180:
31:
734:
559:
554:
534:
365:
339:
on the context parameter given to the loader function (i.e. jumping to
164:
30:
For applications that speed up loading from a tape or disk drive, see
385:
OS Supervisor (although it certainly uses many
Supervisor services).
270:
140:
469:
323:) recursively (check the imports' imports, their imports and so on);
42:
489:
589:
187:
may allow the loader to be located in a region of memory that is
176:
361:
188:
369:
208:
195:
and the contents of the associated executable file. (See
423:
that CCW has been accessed by the channel via a special
298:
allocation of environment variable block and PATH block;
301:
addition of executable and NTDLL to the module list (a
706:
454:
or .dylib files) to already loaded running programs.
277:
initialisation of structures in the DLL itself (i.e.
465:
312:
to obtain several important functions, for instance
226:
validation (permissions, memory requirements etc.);
67:. Unsourced material may be challenged and removed.
852:
659:
639:
442:are another type of loader that load and link
692:
326:in debug mode, raising of system breakpoint;
379:
368:mainframes, and its descendants, including
699:
685:
232:the executable object from the disk into
127:Learn how and when to remove this message
14:
853:
319:loading of executable's imports (i.e.
680:
388:IEWFETCH utilizes highly specialized
360:. Some well-known examples are IBM's
347:
253:jumping to the program entry point (
65:adding citations to reliable sources
36:
222:. The Unix loader's tasks include:
202:
24:
434:
25:
877:
343:, that will start the executable)
284:validation of executable to load;
663:IBM OS Linkage Editor and Loader
468:
151:that is responsible for loading
41:
265:7 and above, the loader is the
163:or copying the contents of the
52:needs additional citations for
653:
633:
608:
13:
1:
601:
565:Relocation (computer science)
505:Dynamic dead code elimination
708:Application binary interface
352:Some operating systems need
273:, which does the following:
7:
500:Dynamic binding (computing)
476:Computer programming portal
461:
27:Part of an operating system
10:
882:
813:Foreign function interface
250:(e.g., the stack pointer);
29:
808:Binary-code compatibility
800:
777:Position-independent code
715:
861:Operating system kernels
660:IBM Corporation (1972).
640:IBM Corporation (1972).
380:OS/360 & Derivatives
440:Dynamic linking loaders
329:initialisation of DLLs;
76:"Loader" computing
321:dynamic-link libraries
269:function contained in
241:command-line arguments
643:IBM OS MVT Supervisor
485:Compile and go system
792:Virtual method table
530:Dynamic-link library
243:into virtual memory;
211:, the loader is the
61:improve this article
757:Memory segmentation
540:Library (computing)
332:garbage collection;
314:BaseThreadInitThunk
866:Computer libraries
730:Calling convention
545:Linker (computing)
354:relocating loaders
348:Relocating loaders
341:RtlUserThreadStart
303:doubly-linked list
291:(via the function
267:LdrInitializeThunk
197:memory-mapped file
147:is the part of an
848:
847:
840:Year 2038 problem
595:Bug compatibility
279:critical sections
263:Microsoft Windows
137:
136:
129:
111:
16:(Redirected from
873:
818:Language binding
701:
694:
687:
678:
677:
671:
670:
668:
657:
651:
650:
648:
637:
631:
630:
628:
627:
622:. The Open Group
612:
570:Relocation table
510:Dynamic dispatch
478:
473:
472:
444:shared libraries
390:channel programs
342:
338:
315:
294:
281:, module lists);
268:
256:
221:
203:Responsibilities
179:, a specialized
173:Embedded systems
149:operating system
141:computer systems
132:
125:
121:
118:
112:
110:
69:
45:
37:
21:
881:
880:
876:
875:
874:
872:
871:
870:
851:
850:
849:
844:
796:
717:
711:
705:
675:
674:
666:
658:
654:
646:
638:
634:
625:
623:
614:
613:
609:
604:
599:
550:Name decoration
525:Dynamic loading
515:Dynamic library
474:
467:
464:
437:
435:Dynamic linkers
382:
350:
340:
336:
313:
292:
266:
254:
219:
205:
165:executable file
133:
122:
116:
113:
70:
68:
58:
46:
35:
28:
23:
22:
15:
12:
11:
5:
879:
869:
868:
863:
846:
845:
843:
842:
837:
832:
831:
830:
820:
815:
810:
804:
802:
801:Related topics
798:
797:
795:
794:
789:
784:
779:
774:
772:Opaque pointer
769:
764:
759:
754:
749:
748:
747:
737:
732:
727:
721:
719:
713:
712:
704:
703:
696:
689:
681:
673:
672:
652:
632:
606:
605:
603:
600:
598:
597:
592:
587:
582:
580:Static library
577:
575:Shebang (Unix)
572:
567:
562:
557:
552:
547:
542:
537:
532:
527:
522:
520:Dynamic linker
517:
512:
507:
502:
497:
495:Direct binding
492:
487:
481:
480:
479:
463:
460:
436:
433:
408:Linkage Editor
381:
378:
374:z/Architecture
349:
346:
345:
344:
333:
330:
327:
324:
317:
306:
299:
296:
287:creation of a
285:
282:
259:
258:
251:
244:
237:
230:memory-mapping
227:
204:
201:
185:virtual memory
161:memory-mapping
135:
134:
49:
47:
40:
26:
9:
6:
4:
3:
2:
878:
867:
864:
862:
859:
858:
856:
841:
838:
836:
833:
829:
826:
825:
824:
821:
819:
816:
814:
811:
809:
806:
805:
803:
799:
793:
790:
788:
785:
783:
780:
778:
775:
773:
770:
768:
765:
763:
762:Name mangling
760:
758:
755:
753:
750:
746:
743:
742:
741:
738:
736:
733:
731:
728:
726:
723:
722:
720:
714:
709:
702:
697:
695:
690:
688:
683:
682:
679:
665:
664:
656:
645:
644:
636:
621:
617:
611:
607:
596:
593:
591:
588:
586:
585:gold (linker)
583:
581:
578:
576:
573:
571:
568:
566:
563:
561:
558:
556:
553:
551:
548:
546:
543:
541:
538:
536:
533:
531:
528:
526:
523:
521:
518:
516:
513:
511:
508:
506:
503:
501:
498:
496:
493:
491:
488:
486:
483:
482:
477:
471:
466:
459:
455:
453:
449:
445:
441:
432:
429:
426:
420:
416:
412:
409:
406:The system's
404:
402:
397:
393:
391:
386:
377:
375:
371:
367:
363:
359:
355:
334:
331:
328:
325:
322:
318:
311:
307:
304:
300:
297:
293:RtlCreateHeap
290:
286:
283:
280:
276:
275:
274:
272:
264:
252:
249:
246:initializing
245:
242:
238:
235:
231:
228:
225:
224:
223:
218:
214:
210:
200:
198:
192:
190:
186:
182:
178:
174:
169:
166:
162:
158:
154:
150:
146:
142:
131:
128:
120:
109:
106:
102:
99:
95:
92:
88:
85:
81:
78: –
77:
73:
72:Find sources:
66:
62:
56:
55:
50:This article
48:
44:
39:
38:
33:
19:
834:
752:Machine code
662:
655:
642:
635:
624:. Retrieved
619:
610:
456:
438:
430:
421:
417:
413:
405:
398:
394:
387:
383:
376:mainframes.
358:base address
351:
310:KERNEL32.DLL
260:
239:copying the
206:
193:
170:
144:
138:
123:
114:
104:
97:
90:
83:
71:
59:Please help
54:verification
51:
787:System call
767:Object code
718:conventions
308:loading of
234:main memory
217:system call
181:boot loader
32:fast loader
855:Categories
782:Relocation
735:Call stack
626:2008-06-23
602:References
560:Prelinking
555:Prebinding
535:GNU linker
452:.dll files
366:System/360
364:for their
337:NtContinue
87:newspapers
725:Alignment
448:.so files
399:The OS's
271:ntdll.dll
248:registers
157:libraries
117:June 2008
18:Load time
490:DLL hell
462:See also
372:for the
335:calling
220:execve()
215:for the
189:pageable
153:programs
828:dynamic
740:Library
590:prelink
401:nucleus
213:handler
177:booting
101:scholar
835:Loader
823:Linker
745:static
716:Parts,
616:"exec"
446:(like
362:OS/360
255:_start
145:loader
103:
96:
89:
82:
74:
710:(ABI)
667:(PDF)
647:(PDF)
108:JSTOR
94:books
370:z/OS
289:heap
209:Unix
155:and
80:news
425:IOS
261:In
207:In
139:In
63:by
857::
618:.
450:,
305:);
295:);
257:).
191:.
143:a
700:e
693:t
686:v
669:.
649:.
629:.
316:;
236:;
130:)
124:(
119:)
115:(
105:·
98:·
91:·
84:·
57:.
34:.
20:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.