From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 9 Nov 2010 09:20:25 -0500 Subject: [U-Boot] Why cmd_tbl_t is referenced as extern in defining __u_boot_cmd_start? In-Reply-To: <30115036.post@talk.nabble.com> References: <30115036.post@talk.nabble.com> Message-ID: <201011090920.25918.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, November 02, 2010 11:56:31 legendbb wrote: > 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? basic C question ? if you dont have the extern, you'd be declaring storage for two variables instead of references to the symbols elsewhere. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20101109/31e53fee/attachment.pgp