添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • From : beritchie at micron dot com
  • To : <gcc-help at gcc dot gnu dot org>
  • Date : Mon, 9 Jan 2006 11:58:01 -0700
  • Subject : ld Bad value error?
  • I am attempting to compile a project on Linux Redhat 8.0 kernel
    2.4.18-27.8.0 on x86 hardware.  I get an error that is not very helpful,
    and I have not been able to find anything on the web that has been much
    help.  It seems that typically the "Bad value" command is accompanied by
    some other descriptor to better define the error, in my case, though,
    "Bad value" is all I get.  I'm hoping that someone can provide some
    indication as to what might be causing the error - even a very general
    indication would be helpful at this point.
    In the included output you can see that the error occurs in the middle
    of the linker searching for libraries.  If I change the order of some of
    the arguments on the command line, the error will occur at a different
    point in the process of opening libraries.  It makes me think that
    perhaps there is some sort of incompatibility with one of the libraries,
    but this is pure uneducated speculation as I am very much a newbie to
    gcc.  I have taken out all of the unsuccessful searches for each
    library, but as the output indicates all libraries were located
    successfully.
    >/mu/dev/gcc/3.3.1/bin/gcc TeradynePBMTEST.cc TeradynePBM.o mti_pbm.o
    -L/mu/dev/gcc/3.3.1/lib -L. -ltt_pbm_decomp -o decomptest -Xlinker
    --verbose
    GNU ld version 2.13.90.0.2 20020802
      Supported emulations:
       elf_i386
       i386linux
       elf_i386_glibc21
    using internal linker script:
    . (Internal linker script output not shown)
    attempt to open /usr/lib/crt1.o succeeded
    /usr/lib/crt1.o
    attempt to open /usr/lib/crti.o succeeded
    /usr/lib/crti.o
    attempt to open
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtbegin.o
    succeeded
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtbegin.o
    attempt to open /tmp/cceGhMm7.o succeeded
    /tmp/cceGhMm7.o
    attempt to open TeradynePBM.o succeeded
    TeradynePBM.o
    attempt to open mti_pbm.o succeeded
    mti_pbm.o
    attempt to open ./libtt_pbm_decomp.a succeeded
    (./libtt_pbm_decomp.a)tt_pbm_decomp.o
    attempt to open /mu/dev/gcc/3.3.1/lib/libstdc++.so succeeded
    -lstdc++ (/mu/dev/gcc/3.3.1/lib/libstdc++.so)
    attempt to open /usr/lib/libm.so succeeded
    -lm (/usr/lib/libm.so)
    attempt to open /mu/dev/gcc/3.3.1/lib/libgcc_s.so succeeded
    -lgcc_s (/mu/dev/gcc/3.3.1/lib/libgcc_s.so)
    attempt t/usr/bin/ld: final link failed: Bad value
    <===============ERROR HERE<<<<<<<<<<<<
    o open ./libgcc.a failed
    attempt to open
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libgcc.a succeeded
    attempt to open /usr/lib/libc.so succeeded
    opened script file /usr/lib/libc.so
    attempt to open /lib/libc.so.6 succeeded
    /lib/libc.so.6
    attempt to open /usr/lib/libc_nonshared.a succeeded
    (/usr/lib/libc_nonshared.a)elf-init.oS
    attempt to open /mu/dev/gcc/3.3.1/lib/libgcc_s.so succeeded
    -lgcc_s (/mu/dev/gcc/3.3.1/lib/libgcc_s.so)
    attempt to open
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libgcc.a succeeded
    attempt to open
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtend.o succeeded
    /mu/dev/gcc/3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtend.o
    attempt to open /usr/lib/crtn.o succeeded
    /usr/lib/crtn.o
    ld-linux.so.2 needed by /lib/libc.so.6
    found ld-linux.so.2 at /lib/ld-linux.so.2
    collect2: ld returned 1 exit status
    Thanks,
    Brian