This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] e500 PPC port -- BFD
Alan Modra writes:
> Please fix --target=powerpc-aix5 breakage.
Try this.
2002-08-21 Elena Zannoni <ezannoni@redhat.com>
* config/tc-ppc.c (ppc_cleanup): Do something only if format
is ELF.
(ppc_apuinfo_section_add): Define only if format is ELF.
(md_assemble): Emit APUinfo section only if format is ELF.
Index: tc-ppc.c
===================================================================
RCS file: /cvs/uberbaum/gas/config/tc-ppc.c,v
retrieving revision 1.54
diff -u -p -r1.54 tc-ppc.c
--- tc-ppc.c 19 Aug 2002 21:08:55 -0000 1.54
+++ tc-ppc.c 21 Aug 2002 19:46:54 -0000
@@ -1281,6 +1281,7 @@ md_begin ()
void
ppc_cleanup ()
{
+#ifdef OBJ_ELF
if (ppc_apuinfo_list == NULL)
return;
@@ -1334,6 +1335,7 @@ ppc_cleanup ()
if (seg && subseg)
subseg_set (seg, subseg);
}
+#endif
}
/* Insert an operand value into an instruction. */
@@ -1933,6 +1935,7 @@ parse_toc_entry (toc_kind)
#endif
^L
+#ifdef OBJ_ELF
#define APUID(a,v) ((((a) & 0xffff) << 16) | ((v) & 0xffff))
static void
ppc_apuinfo_section_add(apu, version)
@@ -1963,6 +1966,7 @@ ppc_apuinfo_section_add(apu, version)
ppc_apuinfo_list[ppc_apuinfo_num++] = APUID(apu, version);
}
#undef APUID
+#endif
^L
/* We need to keep a list of fixups. We can't simply generate them as
@@ -2449,6 +2453,7 @@ md_assemble (str)
if (*str != '\0')
as_bad (_("junk at end of line: `%s'"), str);
+#ifdef OBJ_ELF
/* Do we need/want a APUinfo section? */
if (ppc_cpu & (PPC_OPCODE_SPE
| PPC_OPCODE_ISEL | PPC_OPCODE_EFS
@@ -2471,6 +2476,7 @@ md_assemble (str)
if (opcode->flags & PPC_OPCODE_RFMCI)
ppc_apuinfo_section_add(PPC_APUINFO_RFMCI, 1);
}
+#endif
/* Write out the instruction. */
f = frag_more (4);