This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Optimize .eh_frame sections in ld, create PT_GNU_EH_FRAME ELF segment
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, gcc at gcc dot gnu dot org
- Date: Thu, 13 Dec 2001 00:50:36 +1030
- Subject: Re: [PATCH] Optimize .eh_frame sections in ld, create PT_GNU_EH_FRAME ELF segment
- References: <20011210174844.H2651@sunsite.ms.mff.cuni.cz>
Hi Jakub,
Looks mostly OK, at least from a quick glance.
On Mon, Dec 10, 2001 at 05:48:44PM +0100, Jakub Jelinek wrote:
> --- bfd/elfxx-ia64.c.jj Fri Dec 7 13:22:19 2001
> +++ bfd/elfxx-ia64.c Fri Dec 7 13:32:50 2001
> @@ -3489,7 +3489,8 @@ elfNN_ia64_relocate_section (output_bfd,
> value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
> if ((sym_sec->flags & SEC_MERGE)
> && ELF_ST_TYPE (sym->st_info) == STT_SECTION
> - && elf_section_data (sym_sec)->merge_info)
> + && elf_section_data (sym_sec)->sec_info_type
> + == ELF_INFO_TYPE_MERGE)
Needs parentheses around elf_section_data .. _TYPE_MERGE so that emacs
automatic formatting won't destroy your nice indentation. You do the
same in many other places too.
> +#define read_uleb128(VAR, BUF) \
> + (VAR) = read_unsigned_leb128 (abfd, buf, &leb128_tmp);\
> + (BUF) += leb128_tmp
Protect with "do .. while (0)" would be nicer.
> +#define read_sleb128(VAR, BUF) \
> + (VAR) = read_signed_leb128 (abfd, buf, &leb128_tmp); \
> + (BUF) += leb128_tmp
Here too.
> +++ include/bfdlink.h Fri Dec 7 13:32:51 2001
> @@ -298,6 +298,10 @@ struct bfd_link_info
> Setting this true may result in a non-sharable text segment. */
> boolean nocopyreloc;
>
> + /* True if .eh_frame_htr section and PT_GNU_EH_FRAME ELF segment
Typo
Alan