aix cross gcc: (pbase_type_info.o): reloc .data:1 not in csect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've created cross-gcc (solaris 11 -> aix 4.3), it's installed in
/opt/xgcc-aix-4.3.0.0-47jan31. GCC built using sources from svn,
revision 183510. I removed references to c++1 from
BUILD_DIR/rs6000-ibm-aix4.3/libstdc++-v3/src/Makefile and commented
out the following lines in BUILD_DIR/gcc/include/stdint.h:

//typedef __INT_FAST8_TYPE__ int_fast8_t;
//typedef __INT_FAST16_TYPE__ int_fast16_t;
//typedef __UINT_FAST8_TYPE__ uint_fast8_t;
//typedef __UINT_FAST16_TYPE__ uint_fast16_t;

After these changes, I were able to build the whole thing.

Now, gcc works fine, that is I were able to compile few programs with
it and they seem to work as expected.

But g++ is another story. I have file main.cc:

int main() { }

Now:
alias xg++='/opt/xgcc-aix-4.3.0.0-47jan31/bin/rs6000-ibm-aix4.3-g++'

root@sol11x86:~/xtest/c++/main# xg++ main.cc -c
root@sol11x86:~/xtest/c++/main# ls
main.cc            main.o

So far so good. Link!

root@sol11x86:~/xtest/c++/main# xg++ main.o -o main
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/bin/ld:
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib/libstdc++.a(pbase_type_info.o):
reloc .data:1 not in csect
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib/libstdc++.a:
could not read symbols: Bad value
collect2: error: ld returned 1 exit status

Rats! Running with '-v' yields:

root@sol11x86:~/xtest/c++/main# xg++ -v main.o -o main
Using built-in specs.
COLLECT_GCC=/opt/xgcc-aix-4.3.0.0-47jan31/bin/rs6000-ibm-aix4.3-g++
COLLECT_LTO_WRAPPER=/opt/xgcc-aix-4.3.0.0-47jan31/libexec/gcc/rs6000-ibm-aix4.3/4.7.0/lto-wrapper
Target: rs6000-ibm-aix4.3
Configured with: ../../src/gcc-4.7.0/configure
--prefix=/opt/xgcc-aix-4.3.0.0-47jan31 --enable-static
--disable-multilib --disable-nls --disable-shared
--with-sysroot=/root/xcomp/src/sysroot/ --with-gnu-as --with-gnu-ld
--enable-languages=c,c++ --target=rs6000-ibm-aix4.3 --with-cpu=powerpc
Thread model: aix
gcc version 4.7.0 20120125 (experimental) (GCC)
COMPILER_PATH=/opt/xgcc-aix-4.3.0.0-47jan31/libexec/gcc/rs6000-ibm-aix4.3/4.7.0/:/opt/xgcc-aix-4.3.0.0-47jan31/libexec/gcc/rs6000-ibm-aix4.3/4.7.0/:/opt/xgcc-aix-4.3.0.0-47jan31/libexec/gcc/rs6000-ibm-aix4.3/:/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/:/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/:/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/bin/
LIBRARY_PATH=/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/:/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib/:/root/xcomp/src/sysroot//lib/:/root/xcomp/src/sysroot//usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'main' '-mcpu=powerpc'
 /opt/xgcc-aix-4.3.0.0-47jan31/libexec/gcc/rs6000-ibm-aix4.3/4.7.0/collect2
--sysroot=/root/xcomp/src/sysroot/ -bpT:0x10000000 -bpD:0x20000000
-btextro -bnodelcsect -o main /root/xcomp/src/sysroot//lib/crt0.o
-L/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0
-L/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib
-L/root/xcomp/src/sysroot//lib -L/root/xcomp/src/sysroot//usr/lib
main.o -lstdc++ -lm
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/libgcc.a
-lc /opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/libgcc.a
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/bin/ld:
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib/libstdc++.a(pbase_type_info.o):
reloc .data:1 not in csect
/opt/xgcc-aix-4.3.0.0-47jan31/lib/gcc/rs6000-ibm-aix4.3/4.7.0/../../../../rs6000-ibm-aix4.3/lib/libstdc++.a:
could not read symbols: Bad value
collect2: error: ld returned 1 exit status

My guess is that assembler, linker, ar and ld work fine, as C programs
work, so most probably g++ produces bad assembly code for C++. Am I
right? Is there anything I can do about it? What information should I
provide? Assembler code for pbase_type_info.o, result of objdump
-<something> pbase_type_info.o, command used for building it?

-- 
Jędrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux