variable, size
Posted: Sat Jul 26, 2003 1:01 pm
Why does the size of the kernel gets much bigger when you add a variable outside a function?
(which you give a value ofcourse)
example:
I' ve always worked around this (I always declared my variables inside the function).
I linked like this:
(which you give a value ofcourse)
example:
Code: Select all
unsigned char c = 5;
int main()
{
while (1)
{
}
}
I linked like this:
Code: Select all
gcc -c file.c
ld -o file -Ttext 0x1000 -e start file.o
objcopy -R .note -R .comment -S -O binary file file.bin