Any Issues Preventing 4.9.1?

Daron Chabot daron.chabot at gmail.com
Wed Nov 12 17:13:01 UTC 2008


Joel Sherrill wrote:
> Hi,
>
> I just wanted to double check that no one
> was holding a patch or problem that we wanted
> to try to address for 4.9.1.
>
> Thanks.
>
>   
I'm doing some testing with 4.9.0 and have found two issues. No 
show-stoppers but I thought I'd post my findings.

1) rtems_bsdnet_synchronize_ntp() is broken in 4.9.0. The problem lies 
in rtems_bsdnet_ntp.c, CVS version 1.10.6.1. However, I see that things 
are fixed with version 1.14 of that file (the "port" problem).

2) Stripping info from binary files produces unusable executables with 
gcc-4.3.2 and binutils-2.18: "bsp-post-link" defined in 
make/custom/pc386.cfg is the culprit. In particular, the 
--remove-section=.rodata option to the $(OBJCOPY) cmd.

Using Qemu, try a simple demonstration (use appropriate paths):

chabotd at opi2043-001--> qemu -no-kqemu -no-reboot -m 128 -boot n -tftp 
/opt/rtems/i386-rtems/pc386/lib/rtems-4.9/tests -bootp /hello.exe 
-serial stdio

Works fine, right ?

Now, run the command defined by "bsp-post-link" on the executable hello.exe:

chabotd at opi2043-001--> cp 
/opt/rtems/i386-rtems/pc386/lib/rtems-4.9/tests/hello.exe /tmp/hello.exe
chabotd at opi2043-001--> cd /tmp
chabotd at opi2043-001--> i386-rtems-objcopy -O elf32-i386 
--remove-section=.rodata --remove-section=.comment 
--remove-section=.note --strip-unneeded hello.exe hello.nxe

And, now try Qemu using "rtems.nxe":

chabotd at opi2043-001--> qemu -no-kqemu -no-reboot -m 128 -boot n -tftp 
/tmp -bootp /hello.nxe -serial stdio
qemu: fatal: triple fault
EAX=00000000 EBX=00000000 ECX=00121b7d EDX=00000000
ESI=0011e5c4 EDI=00000004 EBP=00000008 ESP=00121b08
EIP=0000004c EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300
CS =0008 00000000 ffffffff 00cf9e00
SS =0010 00000000 ffffffff 00cf9300
DS =0010 00000000 ffffffff 00cf9300
FS =0010 00000000 ffffffff 00cf9300
GS =0010 00000000 ffffffff 00cf9300
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT=     0011bc70 00000017
IDT=     0011bc90 000007ff
CR0=00050033 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000000 CCD=00000000 CCO=ADDB
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 
XMM01=00000000000000000000000000000000XMM02=00000000000000000000000000000000 
XMM03=00000000000000000000000000000000XMM04=00000000000000000000000000000000 
XMM05=00000000000000000000000000000000XMM06=00000000000000000000000000000000 
XMM07=00000000000000000000000000000000
Aborted

As I implied, omitting the "--remove-section=.rodata" from the 
$(OBJCOPY) command *will* produce a functional, stripped executable. 
Plus, it only costs 48 bytes :-)

Perhaps someone with more experience can weigh in...


-- dc





More information about the users mailing list