Hi,
When getting glibc support working for ILP32 I noticed that rela
sections were incorrectly being aligned which caused the overall rela
section (due to combing relocas being the default) to have garbage in
it. This patch fixes the problem by using LOG_FILE_ALIGN instead of 3
in the place where the sections are created in
elfNN_aarch64_check_relocs.
OK? Build and tested on aarch64-elf and aarch64-linux-gnu (with some
additional patches applied).
Thanks,
Andrew Pinski
bfd/ChangeLog:
* elfnn-aarch64.c (elfNN_aarch64_check_relocs):
Use the correct alignment for _bfd_elf_make_dynamic_reloc_section for ILP32.
fixrelaalignment.diff.txt
? bfd/.elfnn-aarch64.c.swp
? ld/autom4te.cache
? ld/emulparams/aarch64linux32.sh
? ld/emulparams/aarch64linux32b.sh
Index: bfd/elfnn-aarch64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfnn-aarch64.c,v
retrieving revision 1.7
diff -u -p -r1.7 elfnn-aarch64.c
--- bfd/elfnn-aarch64.c 3 Jul 2013 17:23:24 -0000 1.7
+++ bfd/elfnn-aarch64.c 23 Jul 2013 23:37:04 -0000
@@ -4807,7 +4807,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
htab->root.dynobj = abfd;
sreloc = _bfd_elf_make_dynamic_reloc_section
- (sec, htab->root.dynobj, 3, abfd, /*rela? */ TRUE);
+ (sec, htab->root.dynobj, LOG_FILE_ALIGN, abfd, /*rela? */ TRUE);
if (sreloc == NULL)
return FALSE;