From owner-freebsd-hackers Sat Jun 13 12:56:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA29079 for freebsd-hackers-outgoing; Sat, 13 Jun 1998 12:56:29 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bingsun1 (bingsun1.cc.binghamton.edu [128.226.1.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA29048 for ; Sat, 13 Jun 1998 12:56:16 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun1 (SMI-8.6/8.6.9) with SMTP id PAA26730 for ; Sat, 13 Jun 1998 15:56:13 -0400 Date: Sat, 13 Jun 1998 15:56:13 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun1 To: hackers Subject: linker set defintion (ls_item) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am reading freeBSD source code concerning the linker set which I believe is a set of *addresses* of similar symbols. The linker set structure is defined in kernel.h as: struct linker_set { int ls_length; const void * ls_item[1]; } The value of ls_item should be the address of an array of pointers. Since the size of this array is not fixed, I wonder why it is not defined as: struct linker_set [ int ls_length; const void ** ls_item; } This may have something to do with the C compiler. I hope some C expert can give me a hint. Thanks in advance. ------------------------------------------------- Zhihui Zhang Department of Computer Science State University of New York at Binghamton Web Site: http://cs.binghamton.edu/~zzhang ------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message