i386 bsp issues

Joel Sherrill joel.sherrill at OARcorp.com
Fri Aug 3 16:58:03 UTC 2001


Quality Quorum wrote:
> 
> On Thu, 2 Aug 2001 lange92 at 2067.resnet.uni.edu wrote:
> 
> > This time I'll answer my own question, and pose another.
> >
> > On Thu, 2 Aug 2001 lange92 at 2067.resnet.uni.edu wrote:
> >
> > > /users/lange92/illinoiscentral/rtems-4.5.0-gnat-3.12p-gcc-2.8.1-i386-rtemscoff/bin/i386-rtemscoff-gcc --pipe -B../../../../../../../../pc386/lib/ -specs bsp_specs -qrtems -g -Wall -ansi -fasm        -c  -O4 -o o-optimize/bspstart.o ../../../../../../../../../rtems-4.5.0/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
> > > ../../../../../../../../../rtems-4.5.0/c/src/lib/libbsp/i386/pc386/startup/bspstart.c:215: warning: alias definitions not supported in this configuration; ignored
> >
> > Turns out the "alias" attribute is not supported in COFF binaries, but is
> > supported in ELF, according to the documentation on gnu.gcc.org in the
> > section about attributes for functions.
> 
> So, why would you use COFF ??? As far as I understand rtems-4.5.0 uses
> ELF by default.

You understand correctly.  They must use COFF because GNAT uses
gcc 2.8.1 which did not support embedded targets for i386-elf.

> > My simple recourse was to refer back to rtems-4.0.0 and do a diff on the
> > bspstart.c files from the two versions of RTEMS, and then simply rename
> > the function bsp_start_default to bsp_start instead of using the
> > alias--just like in 4.0. As a result, `make all' finally succeeded.
> >
> > So my next question is, what sort of side effects should I expect from
> > that change? I would imagine the difference would be the same as going
> > from 4.0 to 4.5 otherwise, at least in regards to this particular
> > function.. Any ideas, from anyone who's used both versions and had a need
> > to use a different bsp_start?
> 
> How does it suppose to work ?
> 
> bsp_start_default is a WEAK alias for bsp_start.
> 
> So, you can include into your application your own custom version of
> bsp_start without a need to rebuild whole BSP. Becaue bsp_start_default
> is a WEAK alias this custom bsp_start will be used instead of
> bsp_start_default().
> 
> bsp_start() is in the
> core of system configuration process so you can
> 
> 1. Do run time configuration.
> 2. Build very diffent system off the same BSP
> 3. Makes binry distirbutions feasible.
> 4. Allows to add drivers at application level

I think that Dan can simply ifdef bsp_start_default to bsp_start
for use with COFF.  There should be no difference between that and
using the default with the alias.

Something like

if elf
alias
else
bsp_start() { bsp_start_default() }
endif

How about that?

> > DanL
> 
> Thanks,
> 
> Aleksey

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list