Public bug reported:
Binary package hint: gcc-4.4
Hi,
Description: Ubuntu 10.04 LTS
Release: 10.04
gcc:
Installed: 4:4.4.3-1ubuntu1
Candidate: 4:4.4.3-1ubuntu1
Version table:
*** 4:4.4.3-1ubuntu1 0
500 http://ftp.crihan.fr/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
Cross-compiling to x86 code
When compiling with :
gcc -O2 -m32 -c -o proc.o proc.c
The generated code is :
0x000000af <+175>: movl $0x0,%gs:0x4
0x000000ba <+186>: lgdtl (%edx)
0x000000bd <+189>: mov $0x18,%edx
0x000000c2 <+194>: mov %edx,%gs
0x000000c4 <+196>: mov %eax,%gs:0x0
When compiling with :
gcc -O1 -m32 -c -o proc.o proc.c
0x000000af <+175>: lgdtl (%edx)
0x000000b2 <+178>: mov $0x18,%edx
0x000000b7 <+183>: mov %edx,%gs
0x000000b9 <+185>: mov %eax,%gs:0x0
0x000000bf <+191>: movl $0x0,%gs:0x4
The first code is wrong : register GS is used (movl $0x0,%gs:0x4)
before loading the GDT (lgdtl (%edx))
It seems to be working fine with GCC version 4.3.4 (Ubuntu
4.3.4-10ubuntu1)
** Affects: gcc-4.4 (Ubuntu)
Importance: Undecided
Status: New
** Tags: code o2 order segment wrong
--
wrong code (wrong order) generated with -O2
https://bugs.launchpad.net/bugs/590859
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs