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: elf backend hide_symbol bug


On Fri, 13 Aug 2004, Alan Modra wrote:

> See http://sources.redhat.com/bugzilla/show_bug.cgi?id=293 for my
> analysis of this problem.  mips, cris, xtensa maintainers should
> note that there may be a similar problem for their ports.

I think I need a clue here...  Please bear with my denseness.

>  The
> backend hide_symbol functions can be called when the plt and got
> unions are used as refcounts, eg. from bfd_elf_link_add_symbols,
> and also when the field may be used as an offset/pointer, eg. from
> _bfd_elf_adjust_dynamic_symbol.

But elf32-cris.c doesn't.  It calls _bfd_elf_link_hash_hide_symbol
from its hide_symbol function which seems to DTRT.

The other function called from the hide_symbol function,
elf_cris_adjust_gotplt_to_got, could supposedly have some
similar problem for got refcounts, but I really need to
reproduce the suspicious case.  The critical piece is of course
to get the hide_symbol called when the plt and got unions are
transformed to be offsets rather than refcounts.

Can you please describe in terms of input what kind of objects
are needed to reproduce the bug exposure?

For example (insufficient; I'd need a GOT reference too, but I
can't even get the hide_symbol function called), I've tried to
do it by linking three object files -shared:

1: ld-cris/obj1.s (just a _start definition)
2: Like ld-cris/dso-1.s but with ".hidden dsofn".
3: An object that references "dsofn" with a PC-relative
   PLT-requesting reloc.

I'll try to find out for myself using the input files to PR293.

brgds, H-P


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