In Linux if we look at the /proc/self/maps: I want information like pathname and starting address for Qnx. How can I get that information? My analysis says that there is not /proc/self/maps file in Qnx. Answer We have self file in QNX too !! The address space is represented by a binary file called “as” in every folder in /proc.
Tag: memory-mapping
How to access physical addresses from user space in Linux?
On a ARM based system running Linux, I have a device that’s memory mapped to a physical address. From a user space program where all addresses are virtual, how can I read content from this address? Answer You can map a device file to a user process memory using mmap(2) system call. Usually, device files are mappings of physical memory
Why data and stack segments are executable?
I have just noticed that my simple program has its data and stack segments executable. I saw it in /proc/[pid]/maps, and simple code confirmed it. For example: then causes prog to execute int3 instruction. Programs written in C and built with gcc have their data, stack and heap non-executable, so why those written in assembly behave in a different manner?