This is the mail archive of the binutils@sources.redhat.com 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: [patch] PPC small data symbols in shared libraries.


On Wednesday 29 June 2005 07:44, Alan Modra wrote:
> 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_.

I tried this, it doesn't work. _bfd_elf_provide_symbol seems to be too late. 
We have already created external relocations against _SDA_BASE_. I couldn't 
figure out how to remove these relocation entries after the symbol was forced 
local.

Paul


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