bug-binutils
[Top][All Lists]
Advanced

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

Re: Help linking ipfilter package.


From: Mario Nigrovic; RVVK40
Subject: Re: Help linking ipfilter package.
Date: Thu, 13 Nov 2003 11:29:38 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701

Nick Clifton wrote:
Hi Mario,


   I'm trying to link ipfilter on Solaris 5.8 and it comes back
with a funky linker error.  I don't know jack about mapfiles, and
hence I'm asking for help!


   with the command

gcc -m64 -mcmodel=medlow /tmp/conftest.c -o /tmp/64.out

   which fails with

/usr/lib/ld/sparcv9/map.below4G: file not recognized: File format not recognized
collect2: ld returned 1 exit status


Could you post the output of adding "-v" to that gcc command line.  ie
it would help to see the exact command line that GCC is using to
invoke collect2.

Ok, here it is:

++ gcc -v -m64 -mcmodel=medlow /tmp/conftest.c -o /tmp/64.out
Reading specs from /usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/specs
Configured with: /media/gnu/gcc-3.3.1/configure 
--prefix=/tools/GNU/005/SunOS_5.8 --disable-nls --with-gnu-as 
--with-as=/tools/GNU/005/SunOS_5.8/bin/as --with-gnu-ld 
--with-ld=/tools/GNU/005/SunOS_5.8/bin/ld
Thread model: posix
gcc version 3.3.1
 /usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/cc1 -quiet -v -iprefix 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/ -D__GNUC__=3 
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 -Dsparc -D__sparc__ -D__sparc 
-D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9 /tmp/conftest.c 
-mptr64 -mstack-bias -mno-v8plus -mcpu=v9 -quiet -dumpbase conftest.c -m64 
-mcmodel=medlow -auxbase conftest -version -o /var/tmp//ccNd58Xg.s
GNU C version 3.3.1 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.3.1.
GGC heuristics: --param ggc-min-expand=73 --param ggc-min-heapsize=81920
ignoring nonexistent directory "/usr/gnu/sparc-sun-solaris2.8/include"
ignoring nonexistent directory 
"/tools/GNU/005/SunOS_5.8/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/include
 /usr/local/include
 /tools/GNU/005/SunOS_5.8/include
 /tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/include
 /usr/include
End of search list.
 /tools/GNU/005/SunOS_5.8/bin/as -V -Qy -s -64 -Av9 -o /var/tmp//ccosiEZt.o 
/var/tmp//ccNd58Xg.s
GNU assembler version 2.14 (sparc-sun-solaris2.8) using BFD version 2.14 
20030612
 /usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/collect2 -V -m 
elf64_sparc -M /usr/lib/ld/sparcv9/map.below4G -Y P,/usr/lib/sparcv9 -Qy -o 
/tmp/64.out 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9/crt1.o 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9/crti.o 
/usr/ccs/lib/sparcv9/values-Xa.o 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9/crtbegin.o 
-L/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9 
-L/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1 
-L/usr/gnu/bin/../lib/gcc-lib 
-L/tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9 
-L/tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1 
-L/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../../../sparc-sun-solaris2.8/lib
 
-L/tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../../../sparc-sun-solaris2.8/lib
 -L/usr/ccs/bin/sparcv9 -L/usr/ccs/bin -L/usr/ccs/lib/sparcv9 -L/usr/ccs/lib 
-L/usr/gnu/bin/../
lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../../sparcv9 
-L/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../.. 
-L/tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../../sparcv9
 -L/tools/GNU/005/SunOS_5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/../../.. 
-L/lib/sparcv9 -L/usr/lib/sparcv9 /var/tmp//ccosiEZt.o -lgcc -lgcc_eh -lc -lgcc 
-lgcc_eh -lc 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9/crtend.o 
/usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/sparcv9/crtn.o
/usr/lib/ld/sparcv9/map.below4G: file not recognized: File format not recognized
GNU ld version 2.14 20030612
  Supported emulations:
   elf32_sparc
   elf64_sparc
collect2: ld returned 1 exit status

From the spec file (/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/specs):
*link_arch64:
%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G}    %{G:-G}    %{YP,*}    
%{R*}    %{compat-bsd:      %{!YP,*:%{p|pg:-Y 
P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9}        
%{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}}      -R /usr/ucblib}    
%{!compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} 
       %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}


   Now the file in question seems perfectly innocent, but it's copyright to
sun so I won't post it.  Essentially it's just some comments and the line

text = V0x80000000;

   And so I'm extremely confused as to what the problem is.  Does anybody
have any suggestions?


It looks like this "map.below4G" file is supposed to be a linker
script, but that either the linker thinks that it is an object file or
else it thinks that it is a script, but not in a scripting language
that it understands.

The former theory would seem to imply that a -T switch is missing from
the linker command line, the latter theory that this map.below4G file
is in a syntax specific to Sun's linker and that it should not be
present on the command line to the GNU linker at all.  Or possibly
that you should be using Sun's linker and not the GNU linker.

I notice with some interest that the -M in the below4G spec is the only
place in the whole file that that -M is used (other than -MD, -MMD, and -MQ
for a cpp section).  Is this perhaps a typo that should be -T?  (There is
no other -T in the spec file, though.)

                                        Mario
--
Whoever fights monsters should see  |
to it that in the process he does   |
not become a monster.  -- Nietzsche |

Poppy says: [x] GBI  [] Internal Use Only  [] Confidential Proprietary
Mommy says: [x] wash your face [x] brush your teeth [x] watch yo' mouth





reply via email to

[Prev in Thread] Current Thread [Next in Thread]