From: Ian Campbell Subject: Re: [PATCH] Integrating applications into Mini-OS Date: Mon, 15 May 2006 13:46:37 +0100 Message-ID: <1147697197.11888.12.camel@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jacob Gorm Hansen Cc: "John D. Ramsdell" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, 2006-05-15 at 14:18 +0200, Jacob Gorm Hansen wrote: > I have attached a small patch to mini-os which ... adds a dummy main Should it be marked with __attribute__((weak))? http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Function-Attributes.html#Function-Attributes ... weak The weak attribute causes the declaration to be emitted as a weak symbol rather than a global. This is primarily useful in defining library functions which can be overridden in user code, though it can also be used with non-function declarations. Weak symbols are supported for ELF targets, and also for a.out targets when using the GNU assembler and linker. Ian.