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]

Don't generate .PPC.EMB.apuinfo sections for 64-bit output


The powerpc assembler can generate .PPC.EMB.apuinfo sections in some
circumstances.  These originate, I think, from the old e500 ABI; in
any case, they are only defined for 32-bit ABIs, and there is a
significant amount of code in bfd/elf32-ppc.c to handle them
appropriately, none of which is in elf64-ppc.c.  However, the
assembler can generate them when building 64-bit code for processors
such as e5500 (which uses PPC_OPCODE_E500MC).  In such circumstances,
they get generated as PROGBITS rather than NOTE sections, which
reportedly can cause problems in a Linux kernel build.

Since these sections are only defined in 32-bit ABIs, I think it's
most appropriate to avoid generating them for 64-bit output, which
this patch does.  Tested with cross to powerpc64-linux-gnu.  OK to
commit?

(Note: there is nothing in the assembler testsuite relating to APUinfo
sections at all.)

2013-01-24  Joseph Myers  <joseph@codesourcery.com>

	* config/tc-ppc.c (md_assemble): Do not generate APUinfo sections
	for 64-bit output.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.194
diff -u -p -r1.194 tc-ppc.c
--- gas/config/tc-ppc.c	16 Jan 2013 06:12:46 -0000	1.194
+++ gas/config/tc-ppc.c	24 Jan 2013 22:45:37 -0000
@@ -3249,7 +3249,8 @@ md_assemble (char *str)
 
 #ifdef OBJ_ELF
   /* Do we need/want an APUinfo section? */
-  if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0)
+  if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0
+      && !ppc_obj64)
     {
       /* These are all version "1".  */
       if (opcode->flags & PPC_OPCODE_SPE)

-- 
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]