[patch] PPC small data symbols in shared libraries.

Alan Modra amodra@bigpond.net.au
Wed Jun 29 06:44:00 GMT 2005
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



More information about the Binutils mailing list