This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] PPC small data symbols in shared libraries.
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 29 Jun 2005 16:14:19 +0930
- Subject: Re: [patch] PPC small data symbols in shared libraries.
- References: <200506282237.08300.paul@codesourcery.com>
On Tue, Jun 28, 2005 at 10:37:06PM +0100, Paul Brook wrote:
> I have some third party ppc shared libraries that export the _SDA_BASE_ and
> _SDA2_BASE_. The list of offending libraries includes the vxworks libc, so
> fixing the libraries isn't really an option.
>
> With old versions of binutils ld unconditionally provided definitions of these
> symbols in executables, so this didn't matter.
I think we should change _bfd_elf_provide_symbol (and
_bfd_elf_provide_section_bound_symbols) to define the symbols if
def_regular is not set. eg. in _bfd_elf_provide_symbol
if (h != NULL && !h->def_regular)
bfd_elf_set_symbol (h, val);
Patch to do this preapproved. Please update the comments also.
The problem you found with _SDA_BASE_ may also affect other symbols,
like _GLOBAL_OFFSET_TABLE_.
--
Alan Modra
IBM OzLabs - Linux Technology Centre