GCC Bug?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shad

GCC Bug?

Post by shad »

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 )
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GCC Bug?

Post by Pype.Clicker »

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)
ChZ

Re:GCC Bug?

Post by ChZ »

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)
Post Reply