金本と申します。

ご返答ありがとうございます。

>金本さんはコミット権欲しいですか?
いただけるならとてもうれしいです。
ただ、中田さんに御指摘頂いたように、わかっていないことがあるので、
もし頂けても基本的にMLで問い合わせをした上で、
了解を得られたらコミットの作業はこちらでするというふうに
させて頂きたいと思います。
そんなことでいいでしょうか?

> いつからdlopenが追加されたかわかりませんか。
AIXのV4のどこかで入ったようです。
4.3.3を昔触ったときに動いていたプログラムで使われていたと思います。
ruby-devの過去のメールを見ると、どうも4.1とかもっと古い頃のような気がします。

> Init_などをはじめとして、公開する必要のない関数はできればexport
> しないようにしたいと思っています。Yuguiさんにも、internalと明示
> されていない関数は公開APIと見なすよ、と脅かされているので。
> objcopyがなくても済むように、リンカオプションでできるのであれば
> MS-Windows(含cygwin)やDarwinのようにそこで処理したいのですが。
添付のパッチでは、expallをやめて、nmの出力からInit_つきのものを
抜いたファイルを作ってエクスポートするようにしてみたのですが、
いかがでしょうか?
ついでに今回はエクスポートなので、.expに変えてみました。

よろしくお願いいたします。
-- 
Yutaka KANEMOTO
http://d.hatena.ne.jp/kinpoco/
SW5kZXg6IGNvbmZpZ3VyZS5pbgo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjb25maWd1cmUuaW4JKHJldmlzaW9u
IDI0ODIzKQorKysgY29uZmlndXJlLmluCSh3b3JraW5nIGNvcHkpCkBAIC0xNzQ1LDkgKzE3NDUs
OCBAQAogCQkJZmkKIAkJCUxEU0hBUkVEPSIkTERTSEFSRUQgJHtsaW5rZXJfZmxhZ30tRyIKIAkJ
CURMREZMQUdTPSctZUluaXRfJChUQVJHRVQpJwotCQkJWExERkxBR1M9IiR7bGlua2VyX2ZsYWd9
LWJFOnJ1YnkuaW1wICR7bGlua2VyX2ZsYWd9LWJydGwiCi0JCQlYTERGTEFHUz0iJFhMREZMQUdT
ICR7bGlua2VyX2ZsYWd9LWJsaWJwYXRoOiR7cHJlZml4fS9sa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RUdJTntwcmludCAiIyEifTsgJCQyfi9eW0JEXSQkL3twcmludCAk
JDF9JyB8IGVncmVwIC12ICdeSW5pdF8nIHwgc29ydCAtdSAtbyAkQAogCiBpbnN0YWxsOiBpbnN0
YWxsLW5vZG9jICQoUkRPQ1RBUkdFVCkKIGluc3RhbGwtYWxsOiBpbnN0YWxsLW5vZG9jIGluc3Rh
bGwtZG9jIGluc3RhbGwtY2FwaQpJbmRleDogTWFrZWZpbGUuaW4KPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gTWFr
ZWZpbGUuaW4JKHJldmlzaW9uIDI0ODIzKQorKysgTWFrZWZpbGUuaW4JKHdvcmtpbmcgY29weSkK
QEAgLTEzNyw3ICsxMzcsNyBAQAogCiBtaW5pcnVieSQoRVhFRVhUKToKIAkJQC1pZiB0ZXN0IC1m
ICRAOyB0aGVuICQoTVYpIC1mICRAICRALm9sZDsgJChSTSkgJEAub2xkOyBmaQotCQkkKFBVUklG
WSkgJChDQykgJChMREZMQUdTKSAkKFhMREZMQUdTKSAkKE1BSU5MSUJTKSAkKE1BSU5PQkopICQo
TUlOSU9CSlMpICQoQ09NTU9OT0JKUykgJChETVlFWFQpICQoQVJDSEZJTEUpICQoTElCUykgJChP
VVRGTEFHKSRACisJCSQoUFVSSUZZKSAkKENDKSAkKExERkxBR1MpICQoWExERkxBR1MpICQoTUFJ
TkxJQlMpICQoTUFJTk9CSikgJChNSU5JT0JKUykgJChDT01NT05PQkpTKSAkKERNWUVYVCkgJChM
SUJTKSAkKE9VVEZMQUcpJEAKIAogJChQUk9HUkFNKToKIAkJQCQoUk0pICRACkluZGV4OiBkbG4u
Ywo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09Ci0tLSBkbG4uYwkocmV2aXNpb24gMjQ4MjMpCisrKyBkbG4uYwkod29ya2lu
ZyBjb3B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