GCC Bug?
GCC Bug?
I had had trouble loading a new gdt in from my kernel. I figured out that somehow gdt does not put the right value in the data field i was trying to fill. (gdtr) so i made a small function to put the value in with assembler, it finally worked. ( the value gcc had was shifted left 16 bits) is this a bug ? (gcc 2.95.2 )
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:GCC Bug?
more likely to be a mis-use or a misunderstanding of some of the dark features of GCC ...
maybe if you post your code and the disassembled code (gcc -S)
maybe if you post your code and the disassembled code (gcc -S)
Re:GCC Bug?
I had that same problem. Try this...
Code: Select all
#pragma pack(1)
typedef struct{
unsigned short limit;
unsigned long addr;
}GDTR;
#pragma pack(4)