pc386dx exception 6 was Re: 4.6.0pre2 and docs released
Joel Sherrill
joel.sherrill at OARcorp.com
Mon Apr 28 13:00:44 UTC 2003
Angelo Fraietta wrote:
>
> Steven Johnson wrote:
>
> > Angelo,
> >
> > Change LDFLAGS += to be
> >
> > LDFLAGS += --gc-sections
>
> This one did not work.
>
> >
> > Unless LD Flags is passed to gcc or g++ and not ld, in which case use:
> > LDFALGS += -Wl,'--gc-sections'
>
> This did work, however, I got an exception 13 after the device drivers
> loaded
cpu.h: I386_EXCEPTION_GENERAL_PROT_ERR = 13,
So I think Steven is on the money -- your init code is missing. In
particular,
I think you don't have the init16 code ins tart16.S which puts you into
protected
mode.
> >
> > I don't actually use GNU Make. I Use JAM Instead. The Make File
> > (JamFile) is a lot cleaner, and I haven't used GNU Make files (other
> > than what comes with RTEMS and other stuff in our own development for
> > a long time, but this is where I would try. You will need to look at
> > the output of running Make to see if the link is perfromed with ld or
> > gcc/g++.
> >
> It uses i386-rtems-g++ (I have attached the final link text)
>
> What is interesting is that this did not occur until gcc3.2.1
>
> In GCC3.2, my executables were substantially smaller, and this is why they didn't crash with the exception 6 -- they did not include the code -- unless I added the include <iostream> directive. I don't have the directive anywhere in my code but it must still be including the iostream. Maybe there is a flag that allows me to not add it.
>
> --
> Angelo Fraietta
>
> PO Box 859
> Hamilton NSW 2303
>
> Home Page
>
> http://www.users.bigpond.com/angelo_f/
>
> There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
> There are those who seek knowledge to be known by others - that is VANITY
> There are those who seek knowledge in order to serve - that is LOVE
> Bernard of Clairvaux (1090 - 1153)
>
> ------------------------------------------------------------------------
> i386-rtems-g++ -B/opt/rtems/i386-rtems/pc386dx/lib/ -specs bsp_specs -qrtems -g -Wall -g -msoft-float -mno-fp-ret-in-387 -D_E_STL -I ../../../estl -I ../engine -I ../engineinterface -I ../hal_include -I ../link_driver -I ../../../threads/source -I ../../../mididriver -I ../../../mididriver/hal_rtems -Wl,'-gc-sections' -Wl,-Ttext,0x00100000 -o o-optimize/smart.obj o-optimize/diags.o o-optimize/fsmount.o o-optimize/rtems_init.o o-optimize/midioutput.o o-optimize/scheduler.o o-optimize/rtems_simulator.o o-optimize/commtasks.o /opt/rtems/i386-rtems/pc386dx/lib/no-dpmem.rel /opt/rtems/i386-rtems/pc386dx/lib/no-mp.rel /opt/rtems/i386-rtems/pc386dx/lib/no-part.rel /opt/rtems/i386-rtems/pc386dx/lib/no-signal.rel ../engine/o-optimize/sm_engine.a ../engineinterface/o-optimize/sm_engineinterface.a ../engine/o-optimize/sm_engine.a ../link_driver/o-optimize/sm_link_driver.a ../link_driver/hal_rtems/o-optimize/sm_comm.a ../../../threads/source/o-optimize/sm_rtems_active.a ../../../threads/source/hal_rtems/o-optimize/sm_rtems_thread.a ../../../mididriver/hal_rtems/o-optimize/rtems_midi.a
> i386-rtems-objcopy -O elf32-i386 --remove-section=.rodata --remove-section=.comment --remove-section=.note --strip-unneeded o-optimize/smart.obj o-optimize/smart.exe
> i386-rtems-objcopy -O binary o-optimize/smart.obj o-optimize/smart.bin
> /opt/rtems/i386-rtems/pc386dx/build-tools/bin2boot -v o-optimize/smart.bt 0x00097E00 /opt/rtems/i386-rtems/pc386dx/lib/start16.bin 0x00097C00 0 o-optimize/smart.bin 0x00100000 0
> header address 0x00097e00, its memory size 0x00000200
> first image address 0x00097c00, its memory size 0x00000200
> second image address 0x00100000, its memory size 0x0007f000
> i386-rtems-nm -g -n o-optimize/smart.obj > o-optimize/smart.num
> i386-rtems-size o-optimize/smart.obj
> text data bss dec hex filename
> 495630 24218 36508 556356 87d44 o-optimize/smart.obj
More information about the users
mailing list