I have written simple Hello world program and compiled it with gcc-arm-linux-gnueabi compiler. It compiles well but when i try to execute it on ARM machine it complains “no such file or directory”. I think gcc-arm-linux-gnueabi is for embedded Linux only due to e(mbedded)abi. Is it different from ARM Linux ABI? Please help me to solve this problem code is
Tag: c++
Startup program and libocci.so.11.1: cannot open shared object file: No such file or directory
please any one save my time .my application is written in c++ I was try to startup on boot in ubuntu linux,but when the program try to start it log error like:- error while loading shared libraries: libocci.so.11.1: cannot open shared object file: No such file or directory my program use oracle api:- my start service script which is written
Strange pointer position in the stack
I wrote this simple code: and I’ve disassembled it to see what the compiler does. Using objdump I obtain: I can understand everything except for the mov QWORD PTR [rbp-0x10],0x0, this correspond (I think)to p=NULL; but from mov QWORD PTR [rbp-0x8],rax I know that my pointer is on rbp-0x8 and it seems correct (the size of a pointer is 8bytes).
Creating “background running” children with fork() and kill each of them with signals
I need to create n children from the same parent, and have them running while the parent asks infinitely for a signal to send to some child. I made the parent create those n children, but they finished executing, so I made them enter a while(1) loop. The problem is, when I try to kill any child, it becomes a
Buggy simple function for binary search (C++)
I wrote a simple function for binary search, but it’s not working as expected. I have a vector with 4000000 32-bit ints. Usually, when I search for a number, if it’s there, it’s found and the index is returned, if it’s not, -1 is returned (the index always corresponds to the value, but that’s not the point). While messing around
How to properly print file content to the command line in C?
I want to print the contents of a .txt file to the command line like this: The file testfile.txt looks like this: The function prints only the first 4 letters line. When using sizeof instead of strlen the whole file is printed. Why is strlen not working? Answer When using sizeof instead of strlen the whole file is printed. Why
Managing Log File Sizes
I am implementing a simple log file handler for an embedded device. I cannot use syslog because it is already reserved for other uses. The device’s SSD size is limited, so there is a real risk of the log file using all of the disk space, which will crash the device. What is the cheapest way I can guarantee I
What is the type of elements of thread_group list in sched.h?
In sched.h, task_struct has following 2 fields: thread_group & thread_node. They keep the first element of their list but I could not find which type of variables they contain. Answer thread_group and thread_node are both intrusive linked-lists of all the threads in a thread group – they are use to link together task_structs, they don’t “contain” anything. The difference between
Linux get context switch timing
I’m implementing some form of internal profiler. Is there a way to know when and for how long a thread is context switched out? I know windows has it w the event tracing api and I know perf logs how many context switches happens. Is there a way to do it on linux? Needing root privileges is not an issue
Why makecontext’s func only accepts integer arguments
The man page for makecontext states that the arguments after argc should be integer(int) only: …the function func is called, and passed the series of integer (int) arguments that follow argc If we look at pthread_create or clone system call, they have one void* argument which is to passed to the func, and a pointer of struct can contain any