home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 May
/
PCWorld_2004-05_cd.bin
/
komunikace
/
apache
/
apache_2.0.48-win32-x86-no_ssl.msi
/
Data.Cab
/
F252202_dso.xml.ko
< prev
next >
Wrap
Extensible Markup Language
|
2003-06-04
|
11KB
|
257 lines
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
<!-- English revision: 1.3.2.2 -->
<manualpage metafile="dso.xml.meta">
<title>╡┐└√░°└»░┤├╝ (DSO) ┴÷┐°</title>
<summary>
<p>╛╞╞──í └Ñ╝¡╣÷┤┬ ░ⁿ╕«└┌░í ╕≡╡Γ╡Θ└╗ ╝▒┼├╟╧┐⌐ ╝¡╣÷┐í ╞≈╟╘╟╥
▒Γ┤╔└╗ ░ß┴ñ╟╥ ╝÷ └╓┤┬ ╕≡╡Γ╚¡╡╚ ╟┴╖╬▒╫╖Ñ└╠┤┘. ╝¡╣÷╕ª ──╞─╟╥╢º
<code>httpd</code> ╜╟╟α╞─└╧┐í ┴ñ└√└╕╖╬ ╕≡╡Γ└╗ ──╞─└╧╟╥
╝÷ └╓┤┘. ╛╞┤╧╕Θ ╕≡╡Γ└╗ <code>httpd</code> ╜╟╟α╞─└╧░·
║╨╕«╟╧┐⌐ ╡┐└√░°└»░┤├╝(Dynamic Shared Objects, DSO)╖╬ ──╞─└╧╟╥
╝÷ └╓┤┘. DSO ╕≡╡Γ└║ ╝¡╣÷╕ª ──╞─└╧╟╥╢º ──╞─└╧╟╧░┼│¬, Apache
Extension Tool (<a href="programs/apxs.html">apxs</a>)└╗
╗τ┐δ╟╧┐⌐ │¬┴▀┐í ──╞─└╧╟╧┐⌐ ├▀░í╟╥ ╝÷ └╓┤┘.</p>
<p>└╠ ╣«╝¡┤┬ DSO ╕≡╡Γ ╗τ┐δ╣²░· ╣Φ░µ └╠╖╨└╗ ╝│╕φ╟╤┤┘.</p>
</summary>
<section id="implementation"><title>▒╕╟÷</title>
<related>
<modulelist>
<module>mod_so</module>
</modulelist>
<directivelist>
<directive module="mod_so">LoadModule</directive>
</directivelist>
</related>
<p>╛╞╞──í ╟┘╜╔┐í ┴ñ└√└╕╖╬ ──╞─└╧╟╪╛▀╟╥
<module>mod_so.c</module>╢≤┤┬ ╕≡╡Γ└║ ╛╞╞──í ╕≡╡Γ└╗
└╨╛ε╡Θ└╠▒Γ└º╟╤ DSO╕ª ┴÷┐°╟╤┤┘.
└╠ ╕≡╡Γ└║ <module>core</module>╕ª ┴ª┐▄╟╧░φ DSO░í
╡╔ ╝÷ ╛°┤┬ └»└╧╟╤ ╕≡╡Γ└╠┤┘. ╜╟┴ª╖╬ ┤┘╕Ñ ╕≡╡τ ╛╞╞──í ╕≡╡Γ└║
<a href="install.html">╝│─í ╣«╝¡</a>┐í╝¡ ╝│╕φ╟╤
<code>configure</code>└╟ <code>--enable-<var>module</var>=shared</code>
┐╔╝╟└╗ ╗τ┐δ╟╧┐⌐ DSO╖╬ ──╞─└╧╟╥ ╝÷ └╓┤┘. ╕≡╡Γ└╗
<code>mod_foo.so</code>┐═ ░░└╠ DSO╖╬ ──╞─└╧╟╤╚─ <code>httpd.conf</code>
╞─└╧┐í <module>mod_so</module>└╟
<directive module="mod_so">LoadModule</directive> ╕φ╖╔╛ε╕ª
╗τ┐δ╟╧┐⌐ ╝¡╣÷ ╜├└█╜├ ╚ñ└║ └τ╜├└█╜├ ▒╫ ╕≡╡Γ└╗ └╨╛ε╡Θ└╧ ╝÷
└╓┤┘.</p>
<p>╛╞╞──í ╕≡╡Γ(╞»╚≈ ┴ª╗∩└┌░í ╕╕╡τ ╕≡╡Γ)╖╬ ╗τ┐δ╟╥ DSO ╞─└╧└╗ ╜▒░╘
╕╕╡Θ▒Γ└º╟╪ <a href="programs/apxs.html">apxs</a> (<em>APache
eXtenSion</em>)╢≤┤┬ ╗⌡╖╬┐ε ┴÷┐° ╟┴╖╬▒╫╖Ñ└╠ └╓┤┘. └╠ ╟┴╖╬▒╫╖Ñ└║
╛╞╞──í ╝╥╜║ ╞«╕« <em>╣█┐í╝¡</em> DSO╖╬ ╗τ┐δ╟╥ ╕≡╡Γ└╗
──╞─└╧╟╥╢º ╗τ┐δ╟╤┤┘. ░││Σ└║ ╜▒┤┘. ╛╞╞──í╕ª ╝│─í╟╥╢º
<code>configure</code>┐═ <code>make install</code>└╠
╛╞╞──í C ╟∞┤⌡╞─└╧└╗ ╝│─í╟╧░φ, DSO ╞─└╧└╗ ──╞─└╧╟╧▒Γ└º╟╤
╟├╖í╞√ ╞»└»└╟ ──╞─└╧╖» ┐╔╝╟░· ╕╡─┐ ┐╔╝╟└╗ <code>apxs</code>
╟┴╖╬▒╫╖Ñ┐í ▒Γ╖╧╟╤┤┘. ▒╫╖í╝¡ <code>apxs</code>╕ª ╗τ┐δ╟╧┤┬ ╗τ┐δ└┌┤┬
╛╞╞──í ╣Φ╞≈║╗ ╝╥╜║ ╞«╕«╛°└╠, ╢╟ DSO ┴÷┐°└╗ └º╟╤ ╟├╖í╞√ ╞»└»└╟
──╞─└╧╖» ┐╔╝╟┐═ ╕╡─┐ ┐╔╝╟┐í ╜┼░µ└╗ ╛▓┴÷╛╩░φ └┌╜┼└╟ ╛╞╞──í
╕≡╡Γ ╝╥╜║╕ª ──╞─└╧╟╥ ╝÷ └╓┤┘.</p>
</section>
<section id="usage"><title>╗τ┐δ╣² ┐Σ╛α</title>
<p>Apache 2.0└╟ DSO ▒Γ┤╔┐í ┤δ╟╤ ┬¬░φ ░ú╖½╟╤ ┐Σ╛α└╠┤┘:</p>
<ol>
<li>
<em>╣Φ╞≈║╗┐í └╓┤┬</em> ╛╞╞──í ╕≡╡Γ└╗ ──╞─└╧╟╧░φ ╝│─í╟╧┤┬
░µ┐∞. ┐╣╕ª ╡Θ╛ε <code>mod_foo.c</code>╕ª DSO
<code>mod_foo.so</code>╖╬:
<example>
$ ./configure --prefix=/path/to/install --enable-foo=shared<br />
$ make install
</example>
</li>
<li>
<em>┴ª╗∩└┌░í ╕╕╡τ</em> ╛╞╞──í ╕≡╡Γ└╗ ──╞─└╧╟╧░φ ╝│─í╟╧┤┬
░µ┐∞. ┐╣╕ª ╡Θ╛ε <code>mod_foo.c</code>╕ª DSO
<code>mod_foo.so</code>╖╬:
<example>
$ ./configure --add-module=module_type:/path/to/3rdparty/mod_foo.c --enable-foo=shared<br />
$ make install
</example>
</li>
<li>
░°└» ╕≡╡Γ└╗ <em>│¬┴▀┐í ╗τ┐δ╟╧▒Γ└º╟╪</em> ╛╞╞──í╕ª ▒╕╝║╟╧┤┬
░µ┐∞:
<example>
$ ./configure --enable-so<br />
$ make install
</example>
</li>
<li>
<em>┴ª╗∩└┌░í ╕╕╡τ</em> ╛╞╞──í ╕≡╡Γ└╗ ──╞─└╧╟╧░φ ╝│─í╟╧┤┬
░µ┐∞. <a href="programs/apxs.html">apxs</a>╕ª ╗τ┐δ╟╧┐⌐
╛╞╞──í ╝╥╜║ ╞«╕« <em>╣█┐í╝¡</em> <code>mod_foo.c</code>╕ª
DSO <code>mod_foo.so</code>╖╬:
<example>
$ cd /path/to/3rdparty<br />
$ apxs -c mod_foo.c<br />
$ apxs -i -a -n foo mod_foo.la
</example>
</li>
</ol>
<p>╕≡╡τ ░µ┐∞ └╧┤▄ ░°└» ╕≡╡Γ└╠ ──╞─└╧╡╟╕Θ, <code>httpd.conf</code>┐í
<directive module="mod_so">LoadModule</directive> ┴÷╜├╛ε╕ª
╗τ┐δ╟╧┐⌐ ╛╞╞──í░í ▒╫ ╕≡╡Γ└╗ └╨╛ε╡Θ└╠░╘ ╕╕╡τ┤┘.</p>
</section>
<section id="background"><title>╣Φ░µ┴÷╜─</title>
<p>╟÷┤δ└√└╬ └»┤╨╜║╖∙┐í┤┬ <em>╡┐└√░°└»░┤├╝</em> (DSO)└╟
╡┐└√ ╕╡┼╖/╖╬╡∙(dynamic linking/loading)└╠╢≤░φ ╟╧┐⌐, ╞»║░╟╤
╟ⁿ╜─└╟ ╜╟╟α─┌╡σ ┴╢░ó└╗ ╕╕╡Θ╛ε ╜╟╟α┴▀└╬ ╜╟╟α╟┴╖╬▒╫╖Ñ└╟
┴╓╝╥░°░ú┐í └╨╛ε╡Θ└╠┤┬ ╕┌┴° ▒Γ┤╔└╠ └╓┤┘.</p>
<p>║╕┼δ ╡╬░í┴÷ ╣µ╣²└╕╖╬ └╨╛ε╡Θ└╧ ╝÷ └╓┤┘. ╟╧│¬┤┬ ╜╟╟α╟┴╖╬▒╫╖Ñ└╠
╜├└█╟╥╢º <code>ld.so</code>╢≤┤┬ ╜├╜║┼█ ╟┴╖╬▒╫╖Ñ└╠ └┌╡┐└╕╖╬
└╨╛ε╡Θ└╠┤┬ ░µ┐∞░φ, ┤┘╕Ñ ╟╧│¬┤┬ ╜╟╟α┴▀└╬ ╟┴╖╬▒╫╖Ñ└╠
<code>dlopen()/dlsym()</code> ╜├╜║┼█╚ú├Γ╖╬ └»┤╨╜║ ╖╬┤⌡(loader)└╟
╜├╜║┼█ └╬┼═╞Σ└╠╜║└╗ ╗τ┐δ╟╧┐⌐ ┴≈┴ó └╨╛ε╡Θ└╠┤┬ ░µ┐∞┤┘.</p>
<p>├╣╣°┬░ ░µ┐∞ DSO╕ª ║╕┼δ <em>░°└»╢≤└╠║Ω╖»╕«(shared libraries)</em>
╚ñ└║ <em>DSO ╢≤└╠║Ω╖»╕«</em>╢≤░φ ║╬╕ú╕τ, ╞─└╧└║
<code>libfoo.so</code>│¬ <code>libfoo.so.1.2</code> ░░└║
└╠╕º└╗ ░í┴°┤┘. └╠╡Θ└║ ╜├╜║┼█ ╡≡╖║┼Σ╕«(║╕┼δ <code>/usr/lib</code>)┐í
└╓░φ, ──╞─└╧╜├ ╕╡─┐ ╕φ╖╔╛ε┐í <code>-lfoo</code>╕ª ┴╓╛ε
╜╟╟α╞─└╧░· ┐¼░ß╟╤┤┘. └╠╖╕░╘ ┴≈┴ó ╜ß┴╪ ╢≤└╠║Ω╖»╕«┤┬ ╜╟╟α╞─└╧┐í
┬ⁿ┴╢╡╟┐⌐╝¡, ╟┴╖╬▒╫╖Ñ└╠ ╜├└█╟╥╢º ╕╡─┐ ┐╔╝╟ <code>-R</code>╖╬
┴≈┴ó ┴÷┴ñ╟╤ ░µ╖╬, ╚»░µ║»╝÷ <code>LD_LIBRARY_PATH</code>╖╬
┴÷┴ñ╟╤ ░µ╖╬ ╚ñ└║ <code>/usr/lib</code>┐í╝¡ └»┤╨╜║ ╖╬┤⌡░í
<code>libfoo.so</code>╕ª ├ú└╗ ╝÷ └╓┤┘. ▒╫╖»╕Θ ╜╟╟α╟┴╖╬▒╫╖Ñ└╟
(╛╞┴≈ ╕°├ú└║(unresolved)) ╜╔║╝(symbol)└╗ DSO┐í╝¡ ├ú░╘╡╚┤┘.</p>
<p>DSO┤┬ ║╕┼δ ╜╟╟α╟┴╖╬▒╫╖Ñ└╟ ╜╔║╝└╗ ├ú┴÷╛╩▒Γ ╢º╣«┐í (DSO░í
└τ╗τ┐δ░í┤╔╟╤ └╧╣▌└√└╬ ─┌╡σ ╢≤└╠║Ω╖»╕«└╠╣╟╖╬) ├ú▒Γ┤┬ ┐⌐▒Γ╝¡
│í│¡┤┘. └»┤╨╜║ ╖╬┤⌡░í ╜╔║╝ ├ú▒Γ╕ª ┐╧└ⁿ╚≈ ┤π┤τ╟╧╣╟╖╬ ╜╟╟α╟┴╖╬▒╫╖Ñ└╠
┴≈┴ó DSO┐í╝¡ ╜╔║╝└╗ ├ú└╗ ╟╩┐Σ░í ╛°┤┘. (╗τ╜╟ <code>ld.so</code>╕ª
║╬╕ú┤┬ ─┌╡σ┤┬ ┴ñ└√└╠ ╛╞┤╤ ╕≡╡τ ╜╟╟α╟┴╖╬▒╫╖Ñ┐í ╕╡┼⌐╡╟┤┬ ╜╟╟α╜├
╜├└█─┌╡σ└╟ └╧║╬┤┘.) ░°┼δ╡╚ ╢≤└╠║Ω╖»╕« ─┌╡σ╕ª ╡┐└√└╕╖╬ └╨╛ε╡Θ└╠┤┬
└σ┴í└║ ╕φ╚«╟╧┤┘. ╢≤└╠║Ω╖»╕« ─┌╡σ░í ╕≡╡τ ╟┴╖╬▒╫╖Ñ┐í ┴▀║╣╟╪╝¡
└·└σ╡╟┤┬ ┤δ╜┼ <code>libc.so</code>┐═ ░░└║ ╜├╜║┼█ ╢≤└╠║Ω╖»╕«┐í
╟╤╣°╕╕ └·└σ╡╟▒Γ ╢º╣«┐í ╡≡╜║┼⌐ ░°░ú└╠ └²╛α╡╚┤┘.</p>
<p>╡╬╣°┬░ ░µ┐∞ DSO╕ª ║╕┼δ <em>░°└»░┤├╝(shared objects)</em>
╚ñ└║ <em>DSO ╞─└╧</em>└╠╢≤░φ ║╬╕ú░φ, (▒╘─ó╗≤ └╠╕º└║
<code>foo.so</code>└╠┴÷╕╕) ╞─└╧└╟ ╚«└σ└┌┤┬ └┌└»╖╙┤┘. └╠
╞─└╧╡Θ└║ ║╕┼δ ╟┴╖╬▒╫╖Ñ └┌├╝ ╡≡╖║┼Σ╕«┐í └º─í╟╧░φ ╜╟╟α╟┴╖╬▒╫╖Ñ┐í
└┌╡┐└╕╖╬ ┐¼░ß╡╟┴÷ ╛╩┤┬┤┘. ┤δ╜┼ ╜╟╟α╟┴╖╬▒╫╖Ñ└║ ╜╟╟α╜├
<code>dlopen()</code>└╗ ╗τ┐δ╟╧┐⌐ DSO╕ª ┴╓╝╥░°░ú┐í
┴≈┴ó └╨╛ε╡Θ┐⌐╛▀ ╟╤┤┘. └╠╢º ╜╟╟α╟┴╖╬▒╫╖Ñ└║ DSO┐í╝¡ ╜╔║╝└╗
├ú┴÷ ╛╩┤┬┤┘. ┤δ╜┼ ╛╒┐í╝¡ ║╗ └»┤╨╜║ ╖╬┤⌡┤┬ └┌╡┐└╕╖╬ ╜╟╟α╞─└╧░·
╜╟╟α╞─└╧└╠ └╠╣╠ └╨╛ε╡Θ└╬ DSO ╢≤└╠║Ω╖»╕«(╞»╚≈ ╟╫╗≤ ┴╕└τ╟╧┤┬
<code>libc.so</code>└╟ ╕≡╡τ ╜╔║╝)┐í╝¡ DSO└╟ (╛╞┴≈ ╕°├ú└║)
╜╔║╝└╗ ├ú┤┬┤┘. ▒╫╖í╝¡ DSO┤┬ ╕╢─í ├│└╜║╬┼═ ╜╟╟α╟┴╖╬▒╫╖Ñ┐í
┴ñ└√└╕╖╬ ╕╡┼⌐╡╚░═░· ░░└╠ ╜╟╟α╞─└╧└╟ ╜╔║╝└╗ ╛╦░╘╡╚┤┘.</p>
<p>DSO└╟ API╕ª └╠┐δ╟╧▒Γ└º╟╪╝¡ ╕╢┴÷╕╖└╕╖╬ ╜╟╟α╟┴╖╬▒╫╖Ñ└║
<code>dlsym()</code>└╕╖╬ DSO┐í╝¡ ╞»┴ñ ╜╔║╝└╗ ├ú╛╞╝¡, ╛╒└╕╖╬
╗τ┐δ╟╧▒Γ└º╟╪ ╡≡╜║╞╨─í(dispatch) ╟Ñ <em>╡ε</em>┐í └·└σ╟╤┤┘.
┤┘╕Ñ ╕╗╖╬ ╜╟╟α╟┴╖╬▒╫╖Ñ└║ ╗τ┐δ╟╥ ╕≡╡τ ╜╟║╝└╗ ┴≈┴ó ├ú╛╞╛▀╟╤┤┘.
└╠╖▒ ▒╕┴╢└╟ └σ┴í└║ ╟┴╖╬▒╫╖Ñ└╟ └╧║╬╕ª ╟┴╖╬▒╫╖Ñ└╠
╟╩┐Σ╟╥╢º▒ε┴÷ └╨╛ε╡Θ└╠┴÷ ╛╩╛╞╡╡ (▒╫╖í╝¡ ╕▐╕≡╕«╕ª │╢║±╟╧┴÷
╛╩░╘) ╡╚┤┘┤┬ ┴í└╠┤┘. ▒Γ║╗ ╟┴╖╬▒╫╖Ñ└╟ ▒Γ┤╔└╗ ╚«└σ╟╧▒Γ└º╟╪
╟╩┐Σ╟╤ ░µ┐∞ └╠ ║╬║╨└╗ ╡┐└√└╕╖╬ └╨╛ε╡Θ└╧ ╝÷ └╓┤┘.</p>
<p>└╠╖▒ DSO ▒╕┴╢░í └┌┐¼╜║╖┤░╘ ║╕└╠┴÷╕╕, ├╓╝╥╟╤ ╛ε╖┴┐ε ┴í└╠
╟╤░í┴÷└╓┤┘. ╟┴╖╬▒╫╖Ñ└╗ ╚«└σ╟╧▒Γ└º╟╪ DSO╕ª ╗τ┐δ╟╥╢º DSO░í
╜╟╟α╟┴╖╬▒╫╖Ñ└╟ ╜╔║╝└╗ ├ú┤┬ └╧└╠┤┘. ┐╓? DSO░í ╜╟╟α╟┴╖╬▒╫╖Ñ└╟
╜╔║╝└╗ "┐¬└╕╖╬ ├ú┤┬ ░═"└║ (╢≤└╠║Ω╖»╕«┤┬ └┌╜┼└╗ ╗τ┐δ╟╧┤┬ ╟┴╖╬▒╫╖Ñ┐í
┤δ╟╪ ╕≡╕Ñ┤┘┤┬) ╢≤└╠║Ω╖»╕« ╝│░Φ┐í ╣▌╟╧╕τ, ╕≡╡τ ╟├╖í╞√┐í╝¡
┴÷┐°╡╟┴÷╛╩░φ ╟Ñ┴╪╚¡╡╟┴÷╡╡ ╛╩╛╥▒Γ ╢º╣«└╠┤┘. ╜╟┴ª╖╬ ╜╟╟α╞─└╧└╟
└ⁿ┐¬╜╔║╝(global symbol)└║ ║╕┼δ └═╜║╞≈╞«(export)╡╟┴÷ ╛╩▒Γ╢º╣«┐í
DSO░í ╗τ┐δ╟╥ ╝÷ ╛°┤┘. DSO╕ª ╗τ┐δ╟╧┐⌐ ╜╟╟α┴▀ ╟┴╖╬▒╫╖Ñ└╗ ╚«└σ╟╧╖┴╕Θ
╕╡─┐┐í░╘ ╕≡╡τ └ⁿ┐¬╜╔║╝└╗ └═╜║╞≈╞«╟╧╡╡╖╧ ░¡┴ª╟╧┤┬ ░═└╠ ┴╓╡╚
╟╪░ß├Ñ└╠┤┘.</p>
<p>░°└»╢≤└╠║Ω╖»╕«┤┬ DSO ╣µ╜─└╟ ╝│░Φ┐°─ó┤δ╖╬ └ⁿ╟ⁿ└√└╠▒Γ╢º╣«┐í
┐ε┐╡├╝┴ª░í ┴ª░°╟╧┤┬ ░┼└╟ ╕≡╡τ ┴╛╖∙└╟ ╢≤└╠║Ω╖»╕«░í ╗τ┐δ╟╤┤┘.
╣▌┤δ╖╬ ╕╣└║ ╟┴╖╬▒╫╖Ñ└║ ╟┴╖╬▒╫╖Ñ└╗ ╚«└σ╟╧▒Γ└º╟╪ ░°└»░┤├╝╕ª
╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘.</p>
<p>1998│Γ ╜╟╟α┴▀ ╜╟┴ª╖╬ ▒Γ┤╔└╗ ╚«└σ╟╧▒Γ└º╟╪ DSO ▒╕┴╢╕ª ╗τ┐δ╟╤
╝╥╟┴╞«┐■╛ε ╞╨┼░┴÷┤┬ (XS ▒╕┴╢┐═ DynaLoader ╕≡╡Γ└╗ ╗τ┐δ╟╤)
Perl 5, Netscape Server <em>╡ε</em>└╕╖╬ ╡σ╣░╛·┤┘. ╛╞╞──í┤┬
└╠╣╠ ▒Γ┤╔└╗ ╚«└σ╟╧▒Γ└º╟╪ ╕≡╡Γ ░││Σ└╗ ╗τ┐δ╟▀░φ ┐▄║╬ ╕≡╡Γ└╗
╛╞╞──í ╟┘╜╔▒Γ┤╔┐í ┐¼░ß╟╧▒Γ└º╟╪ │╗║╬└√└╕╖╬ ╡≡╜║╞╨─í╕±╖╧└╗
└╠┐δ╟╤ ┴ó▒┘╣µ╣²└╗ ╗τ┐δ╟▀▒Γ╢º╣«┐í 1.3 ╣÷└ⁿ║╬┼═ └╠ ┤δ┐¡┐í ╟╒╖∙╟▀┤┘.
▒╫╖í╝¡ ╛╞╞──í┤┬ ╜╟╟α┴▀ ╕≡╡Γ└╗ └╨╛ε╡Θ└╠┤┬╡Ñ DSO╕ª ╗τ┐δ╟╧╡╡╖╧
┐ε╕φ┴÷┐÷┴│┤┘.</p>
</section>
<section id="advantages"><title>└σ┤▄┴í</title>
<p>╛╒┐í╝¡ ╕╗╟╤ DSO╕ª ╗τ┐δ╟╧╕Θ ┤┘└╜░· ░░└║ └σ┴í└╠ └╓┤┘:</p>
<ul>
<li>╜╟┴ª ╝¡╣÷ ╟┴╖╬╝╝╜║░í ──╞─└╧╜├ <code>configure</code>
┐╔╝╟┤δ╜┼ <code>httpd.conf</code>└╟ <directive
module="mod_so">LoadModule</directive>└╗ ╗τ┐δ╟╧┐⌐ ╜╟╟α┴▀┐í
░ß╟╒╡╟╣╟╖╬ ╝¡╣÷ ╞╨┼░┴÷ ╜╟╟α└╠ ┤⌡ └»┐¼╟╧┤┘. ┐╣╕ª ╡Θ╛ε ╟╤╣°└╟
╛╞╞──í ╝│─í╕╕└╕╖╬ ┤┘╕Ñ ╝¡╣÷(╟Ñ┴╪ ╣÷└ⁿ░· SSL ╣÷└ⁿ, ├╓╝╥╚¡
╣÷└ⁿ░· ▒Γ┤╔├▀░í ╣÷└ⁿ [mod_perl, PHP3] <em>╡ε</em>)╕ª ╜╟╟α╟╥
╝÷ └╓┤┘.</li>
<li>╝¡╣÷┤┬ ╝│─í╚─┐í╡╡ ┴ª╗∩└┌░í ╕╕╡τ ╕≡╡Γ└╗ ╗τ┐δ╟╧┐⌐ ╜▒░╘
╚«└σ╟╥ ╝÷ └╓┤┘. ├╓╝╥╟╤ ▒Γ╛≈└╟ ╞╨┼░┴÷ ┴ª└█└┌┤┬ ╛╞╞──í ╟┘╜╔
╞╨┼░┴÷┐═ ║░╡╡╖╬ PHP3, mod_perl, mod_fastcgi <em>╡ε</em>└╗
├▀░í ╞╨┼░┴÷╖╬ ╕╕╡Θ ╝÷ └╓╛ε╝¡ ┼½ └╠╡µ└╠┤┘.</li>
<li>DSO┐═ <code>apxs</code>╕ª ░í┴÷░φ ╛╞╞──í ╝╥╜║ ╞«╕« ╣█┐í╝¡
└█╛≈╟╧░φ <code>apxs -i</code>┐═ <code>apachectl restart</code>
╕φ╖╔╛ε╕╕└╕╖╬ ╟÷└τ ░│╣▀╟╤ ╕≡╡Γ└╟ ╗⌡ ╣÷└ⁿ└╗ ╜╟╟α┴▀└╬ ╛╞╞──í
╝¡╣÷┐í ╣▌┐╡╟╥ ╝÷ └╓╛ε╝¡ ┤⌡ ╜▒░╘ ╛╞╞──í ╕≡╡Γ└╗ ░│╣▀╟╥ ╝÷
└╓┤┘.</li>
</ul>
<p>DSO┤┬ ┤┘└╜░· ░░└║ ┤▄┴í└╠ └╓┤┘:</p>
<ul>
<li>╟┴╖╬▒╫╖Ñ└╟ ┴╓╝╥░°░ú┐í ─┌╡σ╕ª ╡┐└√└╕╖╬ └╨╛ε╡Θ└╠┤┬ ▒Γ┤╔└╗
┴÷┐°╟╧┴÷╛╩┤┬ ┐ε┐╡├╝┴ª░í └╓▒Γ ╢º╣«┐í ╕≡╡τ ╟├╖í╞√┐í╝¡ DSO╕ª
╗τ┐δ╟╥ ╝÷ ╛°┤┘.</li>
<li>└»┤╨╜║ ╖╬┤⌡░í ╜╔║╝└╗ ├ú╛╞╛▀╟╧▒Γ ╢º╣«┐í ╝¡╣÷ ╜├└█└╠
╛α 20% ┴ñ╡╡ ┤╩╛ε┴°┤┘.</li>
<li>╝¡╣÷┤┬ └º─í╡╢╕│─┌╡σ(position independent code, PIC)
╢º╣«┐í └²┤δ┴╓╝╥┴÷┴ñ(absolute addressing)║╕┤┘ ┤└╕░
╗≤┤δ┴╓╝╥┴÷┴ñ(relative addressing)└╟ ║╣└Γ╟╤ ╛ε╝└║φ╖» ▒Γ╣²└╠
╟╩┐Σ╟╧╣╟╖╬ ╛ε╢▓ ╟├╖í╞√┐í╝¡ ╜╟╟α╜├ ╛α 5% ┴ñ╡╡ ┤╩┤┘.</li>
<li>DSO ╕≡╡Γ└╗ ┤┘╕Ñ DSO▒Γ╣▌ ╢≤└╠║Ω╖»╕«(<code>ld -lfoo</code>)┐í
╕╡┼⌐╟╥ ╝÷ ╛°┤┬ ╟├╖í╞√└╠ └╓▒Γ╢º╣«┐í (┐╣╕ª ╡Θ╛ε ELF▒Γ╣▌
╟├╖í╞√└║ ┴÷┐°╟╧┴÷╕╕ a.out▒Γ╣▌ ╟├╖í╞√└║ ║╕┼δ └╠ ▒Γ┤╔└╗
┴÷┐°╟╧┴÷ ╛╩┤┬┤┘) ╕≡╡τ ┴╛╖∙└╟ ╕≡╡Γ┐í DSO╕ª ╗τ┐δ╟╥ ╝÷ ╛°┤┘.
┤┘╕Ñ ╕╗╖╬ DSO ╞─└╧╖╬ ──╞─└╧╟╧┤┬ ╕≡╡Γ└║ ╛╞╞──í ╟┘╜╔░· ╛╞╞──í
╟┘╜╔└╠ ╗τ┐δ╟╧┤┬ C ╢≤└╠║Ω╖»╕«(<code>libc</code>)┐═ ┤┘╕Ñ
╡┐└√/┴ñ└√ ╢≤└╠║Ω╖»╕«, └º─í╡╢╕│─┌╡σ╕ª ┤π░φ └╓┤┬ ┴ñ└√ ╢≤└╠║Ω╖»╕«
╛╞─½└╠║Ω(<code>libfoo.a</code>)└╟ ╜╔║╝╕╕└╗ ╗τ┐δ╟╥ ╝÷ └╓┤┘.
┤┘╕Ñ ─┌╡σ╕ª ╗τ┐δ╟╧╖┴╕Θ ╛╞╞──í ╟┘╜╔└╠ ▒╫░═└╗ ┬ⁿ┴╢╟╧┤°┴÷,
<code>dlopen()</code>└╕╖╬ ┴≈┴ó ─┌╡σ╕ª └╨╛ε╡Θ┐⌐╛▀ ╟╤┤┘.</li>
</ul>
</section>
</manualpage>