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]

Re: Cross-assembling for AIX/PowerPC64


On 25/07/14 09:36, Tristan Gingold wrote:

On 25 Jul 2014, at 09:22, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:

Hi,

I have configured binutils 2.24 using the following configure command (on OS X 10.9):

  ../configure --target=powerpc-ibm-aix53 --with-sysroot --disable-werror

The resulting assembler can assemble for AIX/PowerPC (32 bit) fine. However, when I try to assemble for AIX/PowerPC64 with this command:

  powerpc-ibm-aix53-as -a64 -u -o ../../rtl/units/powerpc64-aix/ctypes.o ../../rtl/units/powerpc64-aix/ctypes.s -mpwr5

Then I get the following error:

  Assembler messages:
  Fatal error: selected target format 'aixcoff64-rs6000' unknown

There is a discrepancy between bfd and gas.  Try to configure for powerpc-ibm-aix or hack gas/config/tc-ppc.c

I had to hack gas/config/tc-ppc.c (manually add a "#define TE_AIX5"; it seems this should normally be set by gas/config/te-aix5.h, but this file doesn't appear to be included anywhere), because configuring for powerpc-ibm-aix resulted in linker errors:

powerpc-ibm-aix-ld -bpT:0x10000000 -bpD:0x20000000 -btextro -binitfini:P.BUG_.._main:FPC_LIB_EXIT -G -L. -o shr_64.o link.res -b64 -bE:linksyms.fpc

/Data/dev/aix/aixroot/lib/crt0_64.o: file not recognized: File format not recognized (that's a crt0_64.o from an AIX 5.3 machine).

Configuring that way also meant that ar's -X64_32 option was not supported (presumably such support was only added in AIX 5.x).

In any case, with the hack it does work. Thanks!


Jonas

PS: shall I file a bug report?


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