[rfc] eh-frame clobbers memory

Richard Henderson rth@twiddle.net
Sun May 22 22:21:00 GMT 2005


On Sun, May 22, 2005 at 11:12:15PM +0930, Alan Modra wrote:
> I suppose alpha must be stashing .eh_frame contents away in
> elf_section_data this_hdr.contents, during elf64_alpha_relax_section.
> Avoid that for .eh_frame and everything should work.

Indeed.  Thanks.  This test is something I should have had all along.


r~


        * elf64-alpha.c (elf64_alpha_relax_section): Only operate
        on SEC_CODE sections.

Index: elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.132
diff -u -p -d -r1.132 elf64-alpha.c
--- elf64-alpha.c	7 May 2005 13:22:51 -0000	1.132
+++ elf64-alpha.c	22 May 2005 21:59:31 -0000
@@ -1969,7 +1993,7 @@ elf64_alpha_relax_section (abfd, sec, li
   *again = FALSE;
 
   if (link_info->relocatable
-      || (sec->flags & SEC_RELOC) == 0
+      || (sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
       || sec->reloc_count == 0)
     return TRUE;
 



More information about the Binutils mailing list