linking against special version

H. J. Lu hjl@lucon.org
Mon Apr 14 19:21:00 GMT 2003


On Mon, Apr 14, 2003 at 09:10:04PM +0300, Yaroslav Popovitch wrote:
> 
> Hi!
> As I know glibc provides ABI with symbol versioning (for compatibility 
> reasons). I want to compile program which would be linked against 
> ABI/API with custom set version. How can I do it?
> 
> For example:
> 
> glibc provides both interfaces for localeconv: GLIBC_2.2 and GLIBC_2.0.
> By default program is linked against the latest version, isn't it?
> But I need to link it against glibc_2.0 version of ABI.

Try

---
asm (".symver foo,foo@GLIBC_2.0");
 
bar ()
{
  foo ();
}
---

You may need binutils 2.13.90.0.20 for it.


H.J.



More information about the Libc-alpha mailing list