Patch: Zero out the allocated dynamic content space.
H . J . Lu
hjl@valinux.com
Fri Aug 18 07:28:00 GMT 2000
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase.tar.gz
Type: application/x-gzip
Size: 15330 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20000818/bf10140b/attachment.bin>
More information about the Binutils
mailing list