This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Setting the VER_FLG_WEAK bit on an ELF version dependency
- From: Tristan Schmelcher <tschmelcher at google dot com>
- To: binutils at sourceware dot org
- Date: Mon, 14 Sep 2009 11:31:14 -0700
- Subject: Setting the VER_FLG_WEAK bit on an ELF version dependency
Hello,
I am writing a Linux app that declares a weak reference to a versioned
symbol from a shared lib (i.e., lower-case "w" in nm), specifically
__stack_chk_fail@@GLIBC_2.4. That is the only symbol from GLIBC_2.4
that I use and my app can run just fine without it, so I want to make
my app loadable on systems with glibc < 2.4. However, the linker does
not automatically set the VER_FLG_WEAK bit for the GLIBC_2.4
dependency, so the dynamic loader doesn't let my app load on such
systems. So how can I set this flag? I haven't found any options
related to it in either ld or objcopy.
Thanks,
Tristan Schmelcher