This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
A patch to fix ELF symtab alignment
- To: binutils at sourceware dot cygnus dot com
- Subject: A patch to fix ELF symtab alignment
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Mon, 5 Feb 2001 22:54:46 -0800
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);