I want to obtain the beginning of a memory page, a page that contains a function.
In my case I try to achieve the page beginning of main function. Which lies in
0x400a80
, I think it is in code section of memory. I would appreciate if you can verify whether it is true or not.
As far as I understood, adress 0x400a80
lies in a page.
When I show memory segments of my process with pmap
, it shows a segment starting with 0x400000
with size 8K, and the next portion goes with 0x601000
with size 4K.
I want to obtain adress 0x400000
because it has the address of the main()
function. How can I achieve starting adress of a page when I have an adress that resides in that page? Is there any built-in way to do in linux ?
Asked by Utku
(1 rep)
May 5, 2020, 09:04 AM
Last activity: Apr 10, 2025, 02:09 PM
Last activity: Apr 10, 2025, 02:09 PM