This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFC: .gnu.strtab (aka merging duplicate strings by ld)
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: RFC: .gnu.strtab (aka merging duplicate strings by ld)
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 28 Mar 2001 11:55:33 -0800
- Cc: binutils at sources dot redhat dot com, rth at redhat dot com, jason at redhat dot com
- References: <20010328183129.A673@sunsite.ms.mff.cuni.cz>
Jakub Jelinek <jakub@redhat.com> writes:
> --- bfd/elf32-i386.c.jj Mon Mar 26 19:44:20 2001
> +++ bfd/elf32-i386.c Wed Mar 28 18:37:27 2001
> @@ -1392,9 +1392,16 @@ elf_i386_relocate_section (output_bfd, i
> {
> sym = local_syms + r_symndx;
> sec = local_sections[r_symndx];
> - relocation = (sec->output_section->vma
> - + sec->output_offset
> - + sym->st_value);
> + if (elf_section_data (sec) && elf_section_data (sec)->strtab_info)
> + relocation =
> + _bfd_gnu_strtab_section_offset
> + (output_bfd, sec, elf_section_data (sec)->strtab_info,
> + sym->st_value, bfd_get_32 (input_bfd,
> + contents + rel->r_offset));
> + else
> + relocation = (sec->output_section->vma
> + + sec->output_offset
> + + sym->st_value);
> }
> else
> {
An implementation which requires changing every ELF backend file is
clearly problematical. Is it required? Can you simply adjust the
symbol values in elf_link_input_bfd?
> + if (tab->alignment_power)
> + pad = alloca (1 << tab->alignment_power);
It used to be the case that code in BFD was not permitted to call
alloca. Perhaps that restrictions has been lifted.
Ian