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]

A patch to fix ELF symtab alignment


swap_out_syms in elf.c set symtab_hdr->sh_addralign to
bed->s->file_align. Shouldn't we do the same in elf_bfd_final_link?

Thanks.


-- 
H.J. Lu (hjl@valinux.com)
---
2001-02-05  H.J. Lu  <hjl@gnu.org>

	* elflink.h (elf_bfd_final_link): Use file_align for STMTAB
	alignment.

Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.48
diff -u -p -r1.48 elflink.h
--- elflink.h	2001/01/23 20:11:14	1.48
+++ elflink.h	2001/02/06 06:19:11
@@ -4443,7 +4443,7 @@ elf_bfd_final_link (abfd, info)
   /* sh_link is set in assign_section_numbers.  */
   /* sh_info is set below.  */
   /* sh_offset is set just below.  */
-  symtab_hdr->sh_addralign = 4;  /* FIXME: system dependent?  */
+  symtab_hdr->sh_addralign = bed->s->file_align;
 
   off = elf_tdata (abfd)->next_file_pos;
   off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, true);

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