Subject: dl* functions on ELF platforms
To: None <tech-userlevel@netbsd.org>
From: T.SHIOZAKI <tshiozak@astec.co.jp>
List: tech-userlevel
Date: 02/23/2000 16:31:55
Hi,

Here is the patch to include dl* functions in libc on ELF platforms.
It is important to insure to resolve these functions in any case.

On ELF platforms, the GNU ld does not embed symbols that are not needed
at link time, except that -export-dynamic or -shared is specified
explicitly.  Therefore, dl* functions, defined in crt0.o, may not be
taken in the shared executable.  In most cases, it is not problem, but
it may make unresolved symbols in the case of revising the shared
libraries.  I experienced such problem when I implemented the dynamic
loadable locale module in the XPG4DL project.  See also:

  http://mail-index.netbsd.org/tech-userlevel/2000/01/08/0005.html
  http://mail-index.netbsd.org/tech-userlevel/2000/01/08/0006.html

It is difficult to solve this problem with keeping binary compatibility
without defining dl* functions in libc.
On the other hand, these functions should also remain with ctr0.o,
at least until soname of libc is changed.
Any a.out platforms have no such problem.

Is this patch acceptable?


begin 664 dlfcn-into-libc.diff.gz
M'XL("&G@MS@``VQI8F,M96UB961D960M9&QO<&5N+F1I9F8`S1AI<]I8\C/\
MB@[CF@$#XO`5DW4261)&LX!8223CJ:G2".D1-!82I2..*Y/Y[=O])$`<B;,?
MMBJN!#V]/E]WOS[D>O,Y---H#,U/L'3?"&]H<2HX=L)707Q*C_B!^<+2?F!S
MSV>"%SA\=^@%"5\(+ENQP,U(0_[X)WOQ@^P9AZ?98I6!!1OBR&EVV_C7[79;
MOC=K.7':<L+E,@PLYL_SI>`0XK?@Y6:S^=W,2F;*H,]FT+F`;K?7/N]UKX$(
MR_5Z_3E))<-..''WDHC/KGKMLXSX[5MHGETT+J&.OU?P]FT9X!3&F@DB&*8X
MEL6A-E:@KPZ5%P1JE:%<_\F;!RZ;@S54;Z4RQ(F=>`XX"SN"TS)8<1)%SB*J
MKAJX5ROG`/[VB@N\N&QTSJ!^<85R2>)/Z`)OCIP!.1-C^7XLCE2IW,S?+>N1
MV0^6[7MV7&X6WZJN'Z('&U;VK+TZ`#M^&#."\\41A/AI26!\'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