This is the mail archive of the
mailing list for the glibc project.
Re: Copy relocations against protected symbols
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 18 Dec 2014 11:02:59 -0800
- Subject: Re: Copy relocations against protected symbols
- Authentication-results: sourceware.org; auth=none
On Thu, Dec 18, 2014 at 10:52 AM, Cary Coutant <email@example.com> wrote:
>> Should we simply disallow creating DSO with protected data on targets
>> with copy relocation?
> I don't think so. Protected symbols are useful, and their presence
As soon as they are used in executable, the program will misbehave.
> doesn't mean that a copy relocation will be needed. It would be pretty
> heavy-handed, since most targets do support copy relocations.
When you create libfoo.so with normal data, bar, it will link and
work fine with executable, x, which accesses bar. But after
you change bar in libfoo.so to protected without relinking x, x will
misbehave and users may not have a clue what is going on.