From mboxrd@z Thu Jan 1 00:00:00 1970 From: legendbb Date: Tue, 2 Nov 2010 08:56:31 -0700 (PDT) Subject: [U-Boot] Why cmd_tbl_t is referenced as extern in defining __u_boot_cmd_start? Message-ID: <30115036.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de line 64 and 65 in include/command.h extern cmd_tbl_t __u_boot_cmd_start; extern cmd_tbl_t __u_boot_cmd_end; definition of cmd_tbl_t is just one line above these. Why "extern" is used? Thanks, struct cmd_tbl_s { char *name; /* Command Name */ int maxargs; /* maximum number of arguments */ int repeatable; /* autorepeat allowed? */ /* Implementation function */ int (*cmd)(struct cmd_tbl_s *, int, int, char *[]); char *usage; /* Usage message (short) */ #ifdef CONFIG_SYS_LONGHELP char *help; /* Help message (long) */ #endif #ifdef CONFIG_AUTO_COMPLETE /* do auto completion on the arguments */ int (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[]); #endif }; typedef struct cmd_tbl_s cmd_tbl_t; extern cmd_tbl_t __u_boot_cmd_start; extern cmd_tbl_t __u_boot_cmd_end; -- View this message in context: http://old.nabble.com/Why-cmd_tbl_t-is-referenced-as-extern-in-defining-__u_boot_cmd_start--tp30115036p30115036.html Sent from the Uboot - Users mailing list archive at Nabble.com.