1<?xml version="1.0" encoding="EUC-KR"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
4        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5              This file is generated from xml source: DO NOT EDIT
6        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7      -->
8<title>���������ü (DSO) ���� - Apache HTTP Server</title>
9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
12<script src="/style/scripts/prettify.min.js" type="text/javascript">
13</script>
14
15<link href="/images/favicon.ico" rel="shortcut icon" /></head>
16<body id="manual-page"><div id="page-header">
17<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p>
18<p class="apache">Apache HTTP Server Version 2.4</p>
19<img alt="" src="/images/feather.gif" /></div>
20<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
21<div id="path">
22<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>���������ü (DSO) ����</h1>
23<div class="toplang">
24<p><span>������ ���: </span><a href="/en/dso.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
25<a href="/fr/dso.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
26<a href="/ja/dso.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
27<a href="/ko/dso.html" title="Korean">&nbsp;ko&nbsp;</a> |
28<a href="/tr/dso.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
29</div>
30<div class="outofdate">�� ������ �ֽ��� ���� �ƴմϴ�.
31            �ֱٿ� ����� ������ ���� ������ ����ϼ���.</div>
32
33    <p>����ġ �������� ���ڰ� ������ �����Ͽ� ������ ������
34    ����� ������ �� �ִ� ���ȭ�� ���α׷��̴�. ������ �����Ҷ�
35    <code>httpd</code> �������Ͽ� �������� ����� ��������
36    �� �ִ�. �ƴϸ� ����� <code>httpd</code> �������ϰ�
37    �и��Ͽ� ���������ü(Dynamic Shared Objects, DSO)�� ��������
38    �� �ִ�. DSO ����� ������ �������Ҷ� �������ϰų�, Apache
39    Extension Tool (<a href="programs/apxs.html">apxs</a>)��
40    ����Ͽ� ���߿� �������Ͽ� �߰��� �� �ִ�.</p>
41
42    <p>�� ������ DSO ��� ����� ��� �̷��� �����Ѵ�.</p>
43  </div>
44<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#implementation">����</a></li>
45<li><img alt="" src="/images/down.gif" /> <a href="#usage">���� ���</a></li>
46<li><img alt="" src="/images/down.gif" /> <a href="#background">�������</a></li>
47<li><img alt="" src="/images/down.gif" /> <a href="#advantages">�����</a></li>
48</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
49<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
50<div class="section">
51<h2><a name="implementation" id="implementation">����</a></h2>
52
53<table class="related"><tr><th>��õ� ���</th><th>��õ� ���þ�</th></tr><tr><td><ul><li><code class="module"><a href="/mod/mod_so.html">mod_so</a></code></li></ul></td><td><ul><li><code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code></li></ul></td></tr></table>
54
55    <p>����ġ �ٽɿ� �������� �������ؾ���
56    <code class="module"><a href="/mod/mod_so.c.html">mod_so.c</a></code>��� ����� ����ġ �����
57    �о���̱����� DSO�� �����Ѵ�.
58    �� ����� <code class="module"><a href="/mod/core.html">core</a></code>�� �����ϰ� DSO��
59    �� �� ��� ������ ����̴�. ������ �ٸ� ��� ����ġ �����
60    <a href="install.html">��ġ ����</a>���� ������
61    <code>configure</code>�� <code>--enable-<em>module</em>=shared</code>
62    �ɼ��� ����Ͽ� DSO�� �������� �� �ִ�. �����
63    <code>mod_foo.so</code>�� ���� DSO�� ���������� <code>httpd.conf</code>
64    ���Ͽ� <code class="module"><a href="/mod/mod_so.html">mod_so</a></code>��
65    <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code> ��ɾ
66    ����Ͽ� ���� ���۽� Ȥ�� ����۽� �� ����� �о���� ��
67    �ִ�.</p>
68
69    <p>����ġ ���(Ư�� �����ڰ� ���� ���)�� ����� DSO ������ ����
70    ��������� <a href="programs/apxs.html">apxs</a> (<em>APache
71    eXtenSion</em>)��� ���ο� ���� ���α׷��� �ִ�. �� ���α׷���
72    ����ġ �ҽ� Ʈ�� <em>�ۿ���</em> DSO�� ����� �����
73    �������Ҷ� ����Ѵ�. ������ ����. ����ġ�� ��ġ�Ҷ�
74    <code>configure</code>�� <code>make install</code>��
75    ����ġ C ��������� ��ġ�ϰ�, DSO ������ �������ϱ�����
76    �÷��� Ư���� �����Ϸ� �ɼǰ� ��Ŀ �ɼ��� <code>apxs</code>
77    ���α׷��� ����Ѵ�. �׷��� <code>apxs</code>�� ����ϴ� ����ڴ�
78    ����ġ ������ �ҽ� Ʈ������, �� DSO ������ ���� �÷��� Ư����
79    �����Ϸ� �ɼǿ� ��Ŀ �ɼǿ� �Ű��� �����ʰ� �ڽ��� ����ġ
80    ��� �ҽ��� �������� �� �ִ�.</p>
81</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
82<div class="section">
83<h2><a name="usage" id="usage">���� ���</a></h2>
84
85    <p>Apache 2.2�� DSO ��ɿ� ���� ª�� ������ ����̴�:</p>
86
87    <ol>
88      <li>
89        <em>�������� �ִ�</em> ����ġ ����� �������ϰ� ��ġ�ϴ�
90        ���. ���� ��� <code>mod_foo.c</code>�� DSO
91        <code>mod_foo.so</code>��:
92
93<div class="example"><p><code>
94$ /configure --prefix=/path/to/install --enable-foo=shared<br />
95$ make install
96</code></p></div>
97      </li>
98
99      <li>
100        <em>�����ڰ� ����</em> ����ġ ����� �������ϰ� ��ġ�ϴ�
101        ���. ���� ��� <code>mod_foo.c</code>�� DSO
102        <code>mod_foo.so</code>��:
103
104<div class="example"><p><code>
105$ /configure --add-module=module_type:/path/to/3rdparty/mod_foo.c --enable-foo=shared<br />
106$ make install
107</code></p></div>
108      </li>
109
110      <li>
111        ���� ����� <em>���߿� ����ϱ�����</em> ����ġ�� �����ϴ�
112        ���:
113
114<div class="example"><p><code>
115$ /configure --enable-so<br />
116$ make install
117</code></p></div>
118      </li>
119
120      <li>
121        <em>�����ڰ� ����</em> ����ġ ����� �������ϰ� ��ġ�ϴ�
122        ���. <a href="programs/apxs.html">apxs</a>�� ����Ͽ�
123        ����ġ �ҽ� Ʈ�� <em>�ۿ���</em> <code>mod_foo.c</code>��
124        DSO <code>mod_foo.so</code>��:
125
126<div class="example"><p><code>
127$ cd /path/to/3rdparty<br />
128$ apxs -c mod_foo.c<br />
129$ apxs -i -a -n foo mod_foo.la
130</code></p></div>
131      </li>
132    </ol>
133
134    <p>��� ��� �ϴ� ���� ����� �����ϵǸ�, <code>httpd.conf</code>��
135    <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code> ���þ
136    ����Ͽ� ����ġ�� �� ����� �о���̰� �����.</p>
137</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
138<div class="section">
139<h2><a name="background" id="background">�������</a></h2>
140
141    <p>�������� ���н���� <em>���������ü</em> (DSO)��
142    ���� ��ŷ/�ε�(dynamic linking/loading)�̶�� �Ͽ�, Ư����
143    ����� �����ڵ� ������ ����� �������� �������α׷���
144    �ּҰ� �о���̴� ���� ����� �ִ�.</p>
145
146    <p>���� �ΰ��� ������� �о���� �� �ִ�. �ϳ��� �������α׷���
147    �����Ҷ� <code>ld.so</code>��� �ý��� ���α׷��� �ڵ�����
148    �о���̴� ����, �ٸ� �ϳ��� �������� ���α׷���
149    <code>dlopen()/dlsym()</code> �ý���ȣ��� ���н� �δ�(loader)��
150    �ý��� �������̽��� ����Ͽ� ���� �о���̴� ����.</p>
151
152    <p>ù��° ��� DSO�� ���� <em>�������̺귯��(shared libraries)</em>
153    Ȥ�� <em>DSO ���̺귯��</em>��� �θ���, ������
154    <code>libfoo.so</code>�� <code>libfoo.so.1.2</code> ����
155    �̸��� �����. �̵��� �ý��� ���丮(���� <code>/usr/lib</code>)��
156    �ְ�, �����Ͻ� ��Ŀ ��ɾ <code>-lfoo</code>�� �־�
157    �������ϰ� �����Ѵ�. �̷��� ���� ���� ���̺귯���� �������Ͽ�
158    �����ǿ���, ���α׷��� �����Ҷ� ��Ŀ �ɼ� <code>-R</code>��
159    ���� ������ ���, ȯ�溯�� <code>LD_LIBRARY_PATH</code>��
160    ������ ��� Ȥ�� <code>/usr/lib</code>���� ���н� �δ���
161    <code>libfoo.so</code>�� ã�� �� �ִ�. �׷��� �������α׷���
162    (���� ��ã��(unresolved)) �ɺ�(symbol)�� DSO���� ã�Եȴ�.</p>
163
164    <p>DSO�� ���� �������α׷��� �ɺ��� ã���ʱ� ������ (DSO��
165    ���밡���� �Ϲ����� �ڵ� ���̺귯���̹Ƿ�) ã��� ���⼭
166    ������. ���н� �δ��� �ɺ� ã�⸦ ������ ����ϹǷ� �������α׷���
167    ���� DSO���� �ɺ��� ã�� �ʿ䰡 ���. (��� <code>ld.so</code>��
168    �θ��� �ڵ�� ������ �ƴ� ��� �������α׷��� ��ũ�Ǵ� �����
169    �����ڵ��� �Ϻδ�.) ����� ���̺귯�� �ڵ带 �������� �о���̴�
170    ������ ��Ȯ�ϴ�. ���̺귯�� �ڵ尡 ��� ���α׷��� �ߺ��ؼ�
171    ����Ǵ� ��� <code>libc.so</code>�� ���� �ý��� ���̺귯����
172    �ѹ� ����DZ� ������ ��ũ ���� ���ȴ�.</p>
173
174    <p>�ι�° ��� DSO�� ���� <em>������ü(shared objects)</em>
175    Ȥ�� <em>DSO ����</em>�̶�� �θ���, (��Ģ�� �̸���
176    <code>foo.so</code>������) ������ Ȯ���ڴ� �����Ӵ�. ��
177    ���ϵ��� ���� ���α׷� ��ü ���丮�� ��ġ�ϰ� �������α׷���
178    �ڵ����� ������� �ʴ´�. ��� �������α׷��� �����
179    <code>dlopen()</code>�� ����Ͽ� DSO�� �ּҰ�
180    ���� �о�鿩�� �Ѵ�. �̶� �������α׷��� DSO���� �ɺ���
181    ã�� �ʴ´�. ��� �տ��� �� ���н� �δ��� �ڵ����� �������ϰ�
182    ���������� �̹� �о���� DSO ���̺귯��(Ư�� �׻� �����ϴ�
183    <code>libc.so</code>�� ��� �ɺ�)���� DSO�� (���� ��ã��)
184    �ɺ��� ã�´�. �׷��� DSO�� ��ġ ó������ �������α׷���
185    �������� ��ũ�ȰͰ� ���� ���������� �ɺ��� �˰Եȴ�.</p>
186
187    <p>DSO�� API�� �̿��ϱ����ؼ� ���������� �������α׷���
188    <code>dlsym()</code>���� DSO���� Ư�� �ɺ��� ã�Ƽ�, ������
189    ����ϱ����� ����ġ(dispatch) ǥ <em>��</em>�� �����Ѵ�.
190    �ٸ� ���� �������α׷��� ����� ��� �Ǻ��� ���� ã�ƾ��Ѵ�.
191    �̷� ������ ������ ���α׷��� �Ϻθ� ���α׷���
192    �ʿ��Ҷ����� �о������ �ʾƵ� (�׷��� �޸��� ��������
193    �ʰ�) �ȴٴ� ���̴�. �⺻ ���α׷��� ����� Ȯ���ϱ�����
194    �ʿ��� ��� �� �κ��� �������� �о���� �� �ִ�.</p>
195
196    <p>�̷� DSO ������ �ڿ������� ��������, �ּ��� ����� ����
197    �Ѱ����ִ�. ���α׷��� Ȯ���ϱ����� DSO�� ����Ҷ� DSO��
198    �������α׷��� �ɺ��� ã�� ���̴�. ��? DSO�� �������α׷���
199    �ɺ��� "������ ã�� ��"�� (���̺귯���� �ڽ��� ����ϴ� ���α׷���
200    ���� ���ٴ�) ���̺귯�� ���迡 ���ϸ�, ��� �÷���
201    ��������ʰ� ǥ��ȭ������ �ʾұ� �����̴�. ������ ����������
202    ��ɺ�(global symbol)�� ���� �ͽ���Ʈ(export)���� �ʱ⶧����
203    DSO�� ����� �� ���. DSO�� ����Ͽ� ������ ���α׷��� Ȯ���Ϸ���
204    ��Ŀ���� ��� ��ɺ��� �ͽ���Ʈ�ϵ��� �����ϴ� ���� �ֵ�
205    �ذ�å�̴�.</p>
206
207    <p>�������̺귯���� DSO ����� �����Ģ��� �������̱⶧����
208    �ü���� �����ϴ� ���� ��� ������ ���̺귯���� ����Ѵ�.
209    �ݴ�� ���� ���α׷��� ���α׷��� Ȯ���ϱ����� ������ü��
210    ������� �ʴ´�.</p>
211
212    <p>1998�� ������ ������ ����� Ȯ���ϱ����� DSO ������ �����
213    ����Ʈ���� ��Ű���� (XS ������ DynaLoader ����� �����)
214    Perl 5, Netscape Server <em>��</em>���� �幰���. ����ġ��
215    �̹� ����� Ȯ���ϱ����� ��� ������ ����߰� �ܺ� �����
216    ����ġ �ٽɱ�ɿ� �����ϱ����� ���������� ����ġ�����
217    �̿��� ���ٹ���� ����߱⶧���� 1.3 ������� �� �뿭�� �շ��ߴ�.
218    �׷��� ����ġ�� ������ ����� �о���̴µ� DSO�� ����ϵ���
219    �����������.</p>
220</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
221<div class="section">
222<h2><a name="advantages" id="advantages">�����</a></h2>
223
224    <p>�տ��� ���� DSO�� ����ϸ� ������ ���� ������ �ִ�:</p>
225
226    <ul>
227      <li>���� ���� ���μ����� �����Ͻ� <code>configure</code>
228      �ɼǴ�� <code>httpd.conf</code>�� <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>�� ����Ͽ� �����߿�
229      ���յǹǷ� ���� ��Ű�� ������ �� �����ϴ�. ���� ��� �ѹ���
230      ����ġ ��ġ������ �ٸ� ����(ǥ�� ����� SSL ����, �ּ�ȭ
231      ����� ����߰� ���� [mod_perl, PHP3] <em>��</em>)�� ������
232      �� �ִ�.</li>
233
234      <li>������ ��ġ�Ŀ��� �����ڰ� ���� ����� ����Ͽ� ����
235      Ȯ���� �� �ִ�. �ּ��� ����� ��Ű�� �����ڴ� ����ġ �ٽ�
236      ������ ������ PHP3, mod_perl, mod_fastcgi <em>��</em>��
237      �߰� ��Ű���� ���� �� �־ ū �̵��̴�.</li>
238
239      <li>DSO�� <code>apxs</code>�� ������ ����ġ �ҽ� Ʈ�� �ۿ���
240      �۾��ϰ� <code>apxs -i</code>�� <code>apachectl restart</code>
241      ��ɾ���� ���� ������ ����� �� ������ �������� ����ġ
242      ������ �ݿ��� �� �־ �� ���� ����ġ ����� ������ ��
243      �ִ�.</li>
244    </ul>
245
246    <p>DSO�� ������ ���� ������ �ִ�:</p>
247
248    <ul>
249      <li>���α׷��� �ּҰ� �ڵ带 �������� �о���̴� �����
250      ���������ʴ� �ü���� �ֱ� ������ ��� �÷��� DSO��
251      ����� �� ���.</li>
252
253      <li>���н� �δ��� �ɺ��� ã�ƾ��ϱ� ������ ���� ������
254      �� 20% ���� �ʾ����.</li>
255
256      <li>������ ��ġ�����ڵ�(position independent code, PIC)
257      ������ ����ּ�����(absolute addressing)���� ����
258      ����ּ�����(relative addressing)�� ������ ����� �����
259      �ʿ��ϹǷ� � �÷��� ����� �� 5% ���� �ʴ�.</li>
260
261      <li>DSO ����� �ٸ� DSO��� ���̺귯��(<code>ld -lfoo</code>)��
262      ��ũ�� �� ��� �÷����� �ֱ⶧���� (���� ��� ELF���
263      �÷����� ���������� a.out��� �÷����� ���� �� �����
264      �������� �ʴ´�) ��� ������ ��⿡ DSO�� ����� �� ���.
265      �ٸ� ���� DSO ���Ϸ� �������ϴ� ����� ����ġ �ٽɰ� ����ġ
266      �ٽ��� ����ϴ� C ���̺귯��(<code>libc</code>)�� �ٸ�
267      ����/���� ���̺귯��, ��ġ�����ڵ带 ��� �ִ� ���� ���̺귯��
268      ��ī�̺�(<code>libfoo.a</code>)�� �ɺ����� ����� �� �ִ�.
269      �ٸ� �ڵ带 ����Ϸ��� ����ġ �ٽ��� �װ��� �����ϴ���,
270      <code>dlopen()</code>���� ���� �ڵ带 �о�鿩�� �Ѵ�.</li>
271    </ul>
272
273</div></div>
274<div class="bottomlang">
275<p><span>������ ���: </span><a href="/en/dso.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
276<a href="/fr/dso.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
277<a href="/ja/dso.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
278<a href="/ko/dso.html" title="Korean">&nbsp;ko&nbsp;</a> |
279<a href="/tr/dso.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
280</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
281<script type="text/javascript"><!--//--><![CDATA[//><!--
282var comments_shortname = 'httpd';
283var comments_identifier = 'http://httpd.apache.org/docs/2.4/dso.html';
284(function(w, d) {
285    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
286        d.write('<div id="comments_thread"><\/div>');
287        var s = d.createElement('script');
288        s.type = 'text/javascript';
289        s.async = true;
290        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
291        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
292    }
293    else { 
294        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
295    }
296})(window, document);
297//--><!]]></script></div><div id="footer">
298<p class="apache">Copyright 2014 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
299<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
300if (typeof(prettyPrint) !== 'undefined') {
301    prettyPrint();
302}
303//--><!]]></script>
304</body></html>