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]

Re: Patch: Zero out the allocated dynamic content space.


On Fri, Aug 18, 2000 at 06:27:47PM +1000, Alan Modra wrote:
> On Fri, 18 Aug 2000, H . J . Lu wrote:
> 
> > "unrecognised: 84" is caused by bfd_alloc, which leaves s->contents
> > uninitialized in certain cases. Most of the ELF targets use bfd_zalloc
> > instead of bfd_alloc for s->contents. I think all ELF targets should
> > use bfd_zalloc. At least, it fixes Linux/ia32:
> 
> I just did exactly the same thing a few hours ago for elf32-hppa.c
> (sourceware doesn't yet have the shared lib support I was fixing.)
> 
> Note that zeroing the memory isn't the best solution.  Ideally, you'd like
> to have finish_dynamic_symbol reclaim the reloc space, which should be
> possible for cases where a reloc is no longer needed due to symbol
> versioning tweaks.  In the hppa case, it was relocs for stubs that were
> causing the problem, and there's no sane way to figure a stub (and it's
> reloc) isn't needed until after the section sizes have been fixed.
> 
> 

I forgot to include the testcase. Here it is.


-- 
H.J. Lu (hjl@gnu.org)

testcase.tar.gz


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