Skip to content
Advertisement

Tag: gcc

Good way to debug stack value corruption

What is a good way to debug stack value corruption. In a program of mine sometimes the address of the this pointer gets changed after a method returns that does a shutdown on a file descriptor. I debugged the program for hours but I can not find the problem. What is a good method to find out what changes the

gcc won’t compile SDL C Program (undefined reference to SDL functions)

I recently moved to linux and i’m having an issue with compiling SDL C programs using gcc. The command i’m using: Even by seperating sdl-config flags: I’m getting the same error: My very simple program: Answer Order of arguments to gcc matters a lot. Read about Invoking GCC (and documentation of binutils, which gcc uses). Then replace with Better yet,

Strange Output Difference Between GCC and MinGW (C++)

I’m working on a project for a computer science class. I wrote the code and tested it using MinGW, and it works fine. I then copied the code over to the university’s Linux server and tested it there, since that’s what my professor grades assignments on. The output is very different – like it printed out a carriage return in

How to print a number in ARM assembly?

I am trying to print a number that I have stored. I’m not sure if I am close or way off. Any help would be appreciated though. Here is my code: It compiles and runs, but I don’t see anything printed. From what I understand, I need the address of where to start printing in r1, how many bytes in

Build .so file from .c file using gcc command line

I’m trying to create a hello world project for Linux dynamic libraries (.so files). So I have a file hello.c: How do I create a .so file that exports hello(), using gcc from the command line? Answer To generate a shared library you need first to compile your C code with the -fPIC (position independent code) flag. This will generate

Buildroot : Which gcc for cross compilation?

I am newbee to buildroot. I can see multiple gccs in buildroot. I assume all are for cross compilation. What are the difference between those ? Answer The one you should use is buildroot-2012.05/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc. The other ones are purely internals binaries.

Advertisement