Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3345416
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:11:00+00:00 2026-05-18T01:11:00+00:00

I am doing a project in linux kernel and I wanted to know what

  • 0

I am doing a project in linux kernel and I wanted to know what does this checkstack.pl do? I have never studied perl so cant understand the program. It will be great if I could understand the program conceptually if not line by line.
Any effort appreciated.

Source:
link text

suppose i want to write the code of my own tweaking a bit, can i write it in a C program. My main Q is : why this code is written or should be written in perl?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:11:00+00:00Added an answer on May 18, 2026 at 1:11 am

    It creates a listing of the size of the stack frame used by every function in the kernel (i.e. the total amount of local scratch space used by each function for local variables and whatnot).

    The way it does this is by going through the disassembly of the kernel and looking for 2 things: function names and instructions which adjust the stack. It looks for function names by looking for lines that match $funcre (qr/^$x* <(.*)>:$/), and it looks for stack adjustment instructions that match $re or $dre; the latter two depend highly on what architecture the kernel was compiled for, which is what the first big block if if/else statements is checking for. $re searches for functions which adjust the stack by a fixed amount (the vast majority of functions), and $dre searches for functions which adjust the stack by a variable amount (rare).

    objdump is part of binutils; objdump -d is the command to disassemble an object file. The usage of this script is to disassemble the kernel (objdump -d vmlinux) and pipe the output into the script. The output of the script is a listing of all of the functions in the kernel, sorted by the largest stack frame size. I assume the purpose of the script is for the kernel maintainers to be able to avoid stack overflows by painfully making sure that the stack frames of everything is as small as possible, and this script allows them to verify this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been doing project Euler for a few days, and I have to admit
I am doing project euler question 33 and have divised a refactor to solve
Im doing a project with C# winforms. This project is composed by: alt text
Im doing this project where i need to download files through a webservice (images,
Im doing a small project in C++ in LINUX PLATFORM.i need to search 10
I have a project written in C that originally was being done on Linux,
When initialize a new git repository (on Linux/Ubuntu), we use: # What this doing:
I want to work with the Linux kernel, but I have no idea where
We are doing some embedded Linux project, the vendor provides us a basic filesystem
I'm doing some Linux kernel development, and I'm trying to use Netbeans. Despite declared

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.