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