This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setting the VER_FLG_WEAK bit on an ELF version dependency


I'm guessing this isn't supported ...

If I made a patch to automatically set the VER_FLG_WEAK bit in the
linker when appropriate, would you be open to accepting it into the
official linker sources?

2009/9/14 Tristan Schmelcher <tschmelcher@google.com>
>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]