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 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


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