Skip to content
Advertisement

Tag: gcc

Which header file do I have to include to get printk() within a kernel source file?

Let’s say I want to use printk() within arch/x86/boot/string.c before compiling the kernel. Which header file do I have to include so that the linker knows where to find printk()? I tried #include <linux/kernel.h> and #include <linux/printk.h> but I always get errors during make bzImage telling me the linker does not find printk: Answer You are trying to instrument the

C compiler cannot create executables on OpenSUSE

I’ve tried to compile xdebug from sources, but I become this output: There is my config.log. I’ve found possible error: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file ‘/usr/lib/crt1.o’ is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file ‘/usr/lib/crti.o’ is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file ‘/usr/lib/crtn.o’ is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: dynamic STT_GNU_IFUNC symbol

size and objdump report different sizes for the text segment

I have tried this, but stuck up to the answer below questions where hello_world-1.c is The executed commands: Can anyone please help me to figure out what might be the reasons for the questions below? The size command didn’t list a stack or heap segment for hello_world or hello_world.o. What might be the reason behind this? (for above question, the

Rewrite at the beginning of the file

I was trying to rewriting text at beginning of file but facing the following: The header file is test.h: The source file is test.c : The main file is main.c: The make file is: The out put was expected is: But it is replacing first few characters of the first line. Where I am going wrong? Answer The output is

version `GLIBC_2.11′ not found while using gcc

I have problem using gcc/g++ after I changed the machine I use, I installed gcc-4.9.2 in my previous machine, when I moved to the new machine, I copied gcc folder to the new machine. When I try to use I get this error : I have already checked this question : `GLIBC_2.11′ not found If it says right, the version

gcc linker (ld) can’t find shared libraries

I’ve trying to cross compile an app for iMX6 CPU using linaro-gcc and a dedicated rootfs. The app might be linked to OpenVG and the standard pthread libraries. It compiles fine but the linker failed to link to the OpenVG library so I added the linker switch -L/home/ae/Documents/toradex/col-imx6/colibri-imx6-sdk/usr/lib and now it links to the OpenVG library. But since then, it

Advertisement