Subject: Re: initfini build problem
To: None <rafal.boni@eDial.com>
From: Havard Eidnes <he@netbsd.org>
List: port-sgimips
Date: 07/30/2001 10:16:23
----Next_Part(Mon_Jul_30_10:16:23_2001_890)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

> -> Finally, the build stopped at:
> ->
> ->   dependall =3D=3D=3D> regress/lib/csu/initfini
> [...]
> -> I don't quite know how to deal with that...  Hints appreciated.
>
> I haven't tripped over this one yet, and my SGIs are packed away in
> the closet as we're re-flooring the computer room this week.  Sorry!

Hm, I guess I'm asking how I can find out which of them is PIC.
Attached below is some debug output, but I'm not at all certain if
it's sufficient to find the cause.  Hints appreciated so that I can
dig deeper.

- H=E5vard

----Next_Part(Mon_Jul_30_10:16:23_2001_890)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


cc   -c -traditional-cpp /usr/src/regress/lib/csu/initfini/arch/mips/initfini_asm.S
cc   -o initfini initfini.o initfini_asm.o 
/usr/bin/ld: initfini_asm.o: linking PIC files with non-PIC files
Bad value: failed to merge target specific data of file initfini_asm.o

...

viola# cat arch/mips/initfini_asm.S
/*      $NetBSD: initfini_asm.S,v 1.2 2001/07/17 15:24:28 simonb Exp $  */

/*
 * This file placed in the public domain.
 * Jason R. Thorpe, July 16, 2001.
 */

#include <mips/asm.h>

        .section .init, "ax", @progbits
        la      t9, i_am_init
        jal     t9
        .align  5
        .previous

        .section .fini, "ax", @progbits
        la      t9, i_am_fini
        jal     t9
        .align  5
        .previous
viola# objdump --syms obj/initfini_asm.o

obj/initfini_asm.o:     file format elf32-bigmips

SYMBOL TABLE:
00000000 l    d  .text  00000000 
00000000 l    d  .data  00000000 
00000000 l    d  .bss   00000000 
00000000 l    d  .init  00000000 
00000000 l    d  .fini  00000000 
00000000 l    d  .reginfo       00000000 
00000000 l    d  .mdebug        00000000 
00000000 l    df *ABS*  00000000 /usr/src/regress/lib/csu/initfini/arch/mips/initfini_asm.S
00000000 l    df *ABS*  00000000 /usr/include/mips/asm.h
00000000 l    df *ABS*  00000000 /usr/include/mips/regdef.h
00000000 l    df *ABS*  00000000 /usr/include/mips/asm.h
00000000 l    df *ABS*  00000000 /usr/src/regress/lib/csu/initfini/arch/mips/initfini_asm.S
00000000         *UND*  00000000 i_am_init
00000000         *UND*  00000000 i_am_fini


viola# nm -op !$
nm -op obj/initfini_asm.o
obj/initfini_asm.o:         U i_am_init
obj/initfini_asm.o:         U i_am_fini
viola# objdump --syms obj/initfini.o

obj/initfini.o:     file format elf32-bigmips

SYMBOL TABLE:
00000000 l    d  .text  00000000 
00000000 l    d  .data  00000000 
00000000 l    d  .bss   00000000 
00000000 l    d  .rodata        00000000 
00000000 l    d  .reginfo       00000000 
00000000 l    d  .mdebug        00000000 
00000000 l       .text  00000000 gcc2_compiled.
00000000 l       .text  00000000 __gnu_compiled_c
00000000 g     F .text  0000005c main
00000000       O *UND*  00000000 _gp_disp
00000000         *UND*  00000000 write
00000000         *UND*  00000000 exit
00000060 g     F .text  00000054 i_am_init
000000b4 g     F .text  00000054 i_am_fini


viola#

----Next_Part(Mon_Jul_30_10:16:23_2001_890)----