This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Add .rela.opd and .rela.branch_lt to elf64ppc linker script


This patch adds .rela.opd and .rela.branch_lt to
OTHER_GOT_RELOC_SECTIONS in emulparams/elf64ppc.sh (as used on
powerpc64-linux-gnu), to prevent them from being handled as orphan
sections.

Although I think avoiding orphan sections in normal use is a good idea
anyway, the specific motivation for this change is to avoid a failure
seen in prelink testing when .rela.dyn is created as part of orphan
section placement, its ELF section number is determined by the order
in which sections are created, and the section offsets in the ELF
output file are not in the same order as the section numbers, which is
I think valid ELF but not something prelink can handle.

Tested with no regressions with cross to powerpc64-linux-gnu.  OK to
commit?

2008-09-29  Joseph Myers  <joseph@codesourcery.com>

	* emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd
	and .rela.branch_lt.

Index: ld/emulparams/elf64ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ppc.sh,v
retrieving revision 1.19
diff -u -r1.19 elf64ppc.sh
--- ld/emulparams/elf64ppc.sh	13 Feb 2007 01:53:03 -0000	1.19
+++ ld/emulparams/elf64ppc.sh	29 Sep 2008 17:20:40 -0000
@@ -28,7 +28,9 @@
   .toc		0 : { *(.toc) }"
 fi
 OTHER_GOT_RELOC_SECTIONS="
-  .rela.toc	${RELOCATING-0} : { *(.rela.toc) }"
+  .rela.toc	${RELOCATING-0} : { *(.rela.toc) }
+  .rela.opd	${RELOCATING-0} : { *(.rela.opd) }
+  .rela.branch_lt	${RELOCATING-0} : { *(.rela.branch_lt) }"
 OTHER_READWRITE_SECTIONS="
   .toc1		${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
   .opd		${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }

-- 
Joseph S. Myers
joseph@codesourcery.com


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