免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 606 | 回复: 0
打印 上一主题 下一主题

Chapter 1: Linking and loading [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-19 11:26 |只看该作者 |倒序浏览

                1  The basic job of any linker
or loader is simple: it binds more abstract names to more concrete names, which
permits programmers to write code using the more abstract names.
2  Overlays,
a technique that let programmers arrange for different parts of a program to
share the same memory, with each overlay loaded on demand when another part of
the program called into it.
3  With the advent of hardware
relocation and virtual memory, linkers
and loaders actually got less complex, since each program could again have an
entire address space.  Programs could be
linked to be loaded at fixed addresses, with hardware rather than software
relocation taking care of any load-time relocation. But
computers with hardware relocation invariably run more than one program,
frequently multiple copies of the same program. When a computer runs multiple
instances of one program, some parts of the program are the same among all
running instance (the executable code, in particular), while other parts are
unique to each instance. If the parts that don't change can be separated out
from the parts that do change, the operating system can use a single copy of
the unchanging part, saving considerable storage. Compilers and assemblers were
modified to create object code in multiple sections, with one section for read
only code and another section for writable data, the linker had to be able to
combine all of sections of each type so that the linked program would have all
the code in one place and all of the data in another. This didn't delay address
binding any more than it already was, since addresses were still assigned at
link time, but more work was deferred to the linker to assign addresses for all
the sections. ----- Lacrimosa: That's why the assembled  code is devided into "data" and "code" sections, or more sections. So, I get the original answer. :)
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/62361/showart_499463.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP