EmbLogic's Blog

Category Archives: Uncategorized

The Table Of Number Two

#include main() { int num=2,i; printf(” The Table Of Number Two “); for(i=1;i<=10;i++) { printf("\n %d * %d = %d",num,i,num*i); } }

Posted in Uncategorized | Tagged | Leave a comment

Facing Problem : CROSS_COMPILE uclibc

$ make CROSS_COMPILE=arm-uclibc- Error : Help me out ld: ldso.o: Relocations in generic ELF (EM: 40) ld: ldso.o: Relocations in generic ELF (EM: 40) ldso.o: could not read symbols: File in wrong format make[2]: *** [lib] Error 1 make[2]: Leaving … Continue reading →

Posted in Uncategorized | Leave a comment

Assienment1, 1 #include

Assienment1. 1 #include:- In ‘C’ programming language all library functions are included in different header files in different categories with “.h” extension. # is called as “preprocessor”. Means it will include the header file before comipling the code. “include” gives … Continue reading →

Posted in Uncategorized | Leave a comment

2.comment:-

2.comment:- A “comment” is a sequence of characters beginning with a forward slash/asterisk combination (/*) that is treated as a single white-space character by the compiler and is otherwise ignored. A comment can include any combination of characters from the … Continue reading →

Posted in Uncategorized | Leave a comment

problem regarding gcc compilation

i faced a problem …when i did “make all” in gcc compilation(in build-gcc directory)…i got a error…No target is specified or Makefile is missing….but when i did make all-gcc,then it has done succesfully with no errors…m waiting for ryt ans…

Posted in Uncategorized | Leave a comment

Structure of a Function

Structure of a Function A general form of a C function looks like this: FunctionName (Argument1, Argument2, Argument3……) { Statement1; Statement2; Statement3; } An example of function. int sum (int x, int y) { int result; result = x + … Continue reading →

Posted in Uncategorized | Leave a comment

How do I change stack frames?

?? (gdb) backtrace #0 func2 (x=30) at test.c:5 #1 0x80483e6 in func1 (a=30) at test.c:10 #2 0×8048414 in main (argc=1, argv=0xbffffaf4) at test.c:19 #3 0x40037f5c in __libc_start_main () from /lib/libc.so.6 (gdb) ? Use the gdb command frame. Notice in the … Continue reading →

Posted in Uncategorized | Leave a comment

How do I get a backtrace?

? Use the gdb command backtrace. In the backtrace below, we can see that we are currently inside func2(), which was called by func1(), which was called from main() (gdb) backtrace #0 func2 (x=30) at test.c:5 #1 0x80483e6 in func1 … Continue reading →

Posted in Uncategorized | Leave a comment

Seeing Dubugging symbols which are added by gcc using -g option

A Debugging Symbol Table maps instructions in the compiled binary program to their corresponding variable, function, or line in the source code. This mapping could be something like: Program instruction => item name, item type, original file, line number defined. … Continue reading →

Posted in Uncategorized | 1 Comment

Building A Cross Compilation Toolchain for ARM from Linux i386 platform

The toolchains were build from the following sources: – binutils-2.11.2.tar.gz – gcc-2.95.3.tar.gz – gcc-2.95.3.diff.bz2 (a re-diffed version of Phil Blundell’s diff) – glibc-2.2.3.tar.gz – glibc-linuxthreads-2.2.3.tar.gz – linux-2.4.6.tar.gz – patch-2.4.6-rmk2.gz – diff-2.4.6-rmk2-np1.gz Sources : linux-2.4.6.tar.gz http://www.kernel.org/pub/linux/kernel/v2.4/ patch-2.4.6-rmk2.gz http://ftp.linux.org.uk/pub/linux/arm/kernel/v2.4/ diff-2.4.6-rmk2-np1.gz ftp://ftp.arm.linux.org.uk/pub/armlinux/people/nico/v2.4/ gcc-2.95.3.diff.bz2 … Continue reading →

Posted in Uncategorized | Leave a comment

gcc 2.95.3 building problem

decl.c: In function ‘start_struct’: decl.c:4451: error: argument ‘code’ doesn’t match prototype ch-tree.h:736: error: prototype declaration make[2]: *** [decl.o] Error 1 make[2]: Leaving directory `/home/cihan/gcc-2.95.3/gcc/ch’ make[1]: *** [cc1chill] Error 2 make[1]: Leaving directory `/home/cihan/gcc-2.95.3/gcc’ make: *** [all-gcc] Error 2

Posted in Uncategorized | 1 Comment

The seq_file interface

why the implementation of large files under /proc is a little awkward ? what is benefits of using seq_file interface over /pro file systems ?

Posted in Uncategorized | Leave a comment

Undefined error for .ko file !!

scull_follow pointer is defined as: dptr=scull_follow(localptr,item); here localptr is struct scull_dev pointer and item is an integer value giving us 1 less than the total number of qsets required. This is the message i get,when i comment the scull_follow pointer: … Continue reading →

Posted in Uncategorized | 1 Comment

problem in scull_read()

int scull_read(struct file *filp, char *buff, size_t count, loff_t *fpos) { scull_dev *dev; printk(“%s \n”,__func__); dev=(scull_dev *)filp->private_data; struct scull_qset *dptr;         // Pointer to the beginning of the data int quantum = dev->quantum;      // Size of a quantum int qset = … Continue reading →

Posted in Uncategorized | Leave a comment

Regarding Kernel Execution

What is the difference b/w concurrent execution and sequential execution??? I have the idea abt the sequential execution ie applications are sequentially executed.. But how Kernel modules are concurrent in execution ?? Plz elaborate.

Posted in Uncategorized | Leave a comment