httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Shared modules -- missing util_script
Date Thu, 05 Feb 1998 19:46:25 GMT


On Thu, 5 Feb 1998, Cristian Gafton wrote:

> That's not true if you do:
> 	ld -o httpd c.o libz.a
> (ie link the library in). You have to decide whether the library will be
> used as a library or as an object file.

That's what I thought too.  But it's not true with gnu ld.

Dean

% cat >a.c
int a() {}
% cat > b.c
int b() {}
% cat > hello.c
void main() {puts("hello");}
% make CFLAGS='-g' a.o b.o hello.o
cc -g   -c a.c -o a.o
cc -g   -c b.c -o b.o
cc -g   -c hello.c -o hello.o
% ar cr t.a a.o b.o
% nm t.a

a.o:
00000000 T a

b.o:
00000000 T b
% ld -o httpd /usr/lib/crt1.o hello.o t.a -lc
% nm hello
080494f8 A _DYNAMIC
080494d8 A _GLOBAL_OFFSET_TABLE_
080494cc ? __CTOR_END__
080494c8 ? __CTOR_LIST__
080494d4 ? __DTOR_END__
080494d0 ? __DTOR_LIST__
080483d0 T ___crt_dummy__
08049580 A __bss_start
08048488 t __do_global_ctors_aux
08048450 t __do_global_dtors_aux
080494c4 D __environ
08049580 B __fpu_control
         U __libc_init
         U __setfpucw
08049580 A _edata
08049584 A _end
080484ac A _etext
080484b0 ? _fini
08048360 ? _init
080483d0 T _start
         U atexit
08048440 t done
080494c4 W environ
         U exit
08048470 t fini_dummy
080494c8 d force_to_data
080494c8 d force_to_data
08048488 t gcc2_compiled.
08048450 t gcc2_compiled.
08048474 t gcc2_compiled.
080484a8 t init_dummy
08048474 T main
         U puts
% ld --version
GNU ld 2.8.1
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   elf_i386
   i386linux


Mime
View raw message