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

  • Home
  • SEARCH
  • 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 6631307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:31:39+00:00 2026-05-25T22:31:39+00:00

call 0x80482f0 <puts@plt> ? Just need help with one line of code in a

  • 0

“call 0x80482f0 <puts@plt>“? Just need help with one line of code in a ‘hello world’ program in x86 assembly.

NOTE: i’m running ubuntu linux while programming/debugging this, using gcc as the compiler and gdb for the debugger.

I am reading Hacking: The art of Exploitation V2 and I compiled this C program:

1       #include <stdio.h>
2
3       int main()
4       {
5         int i;
6         for(i=0; i<10; i++)
7         {
8           printf("Hello, world\n");
9         }
10        return 0;

into this program in assembly:

   0x080483b4 <+0>:     push   ebp
   0x080483b5 <+1>:     mov    ebp,esp
   0x080483b7 <+3>:     and    esp,0xfffffff0
   0x080483ba <+6>:     sub    esp,0x20
   0x080483bd <+9>:     mov    DWORD PTR [esp+0x1c],0x0
   0x080483c5 <+17>:    jmp    0x80483d8 <main+36>
   0x080483c7 <+19>:    mov    DWORD PTR [esp],0x80484b0
   0x080483ce <+26>:    call   0x80482f0 <puts@plt>
=> 0x080483d3 <+31>:    add    DWORD PTR [esp+0x1c],0x1
   0x080483d8 <+36>:    cmp    DWORD PTR [esp+0x1c],0x9
   0x080483dd <+41>:    jle    0x80483c7 <main+19>
   0x080483df <+43>:    mov    eax,0x0
   0x080483e4 <+48>:    leave  
   0x080483e5 <+49>:    ret

now.. i understand every portion of this program, until it gets to:

   0x080483ce <+26>:    call   0x80482f0 <puts@plt>

what i do not understand is.. if “Hello, world\n” is stored at 0x80484b0, and that address is then stored into the address at ESP, why does the:

0x080483ce <+26>:    call   0x80482f0 <puts@plt>

refer to 0x80482f0, instead of [esp] or just “0x80484b0” to print “Hello, world\n” to the screen? i used gdb and i cannot figure out what exactly is being referenced with 0x80482f0.. any help would be great

thanks (and remember, im just starting out with this stuff, so im a noob)

also.. i copy and pasted the disassembled main function from gdb for convenience, if you need any more info, just ask. and if you would like to explain that one command for me, that would be great as well because i’ve only used “int 80h”‘s for printing stuff to the screen before

  • 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-25T22:31:40+00:00Added an answer on May 25, 2026 at 10:31 pm

    0x80482f0 is the address of the puts function. To be more precise, it points to the entry for puts() in the program linker table (PLT) – basically just a bunch of JMP <some routine in a so-library>s (it’s a little more complex than that, but that’s not important for this discussion). The puts function looks for its argument on the stack – ie, at [esp].

    You may be wondering where that puts() call came from – the compiler here was smart enough to see that you didn’t actually use any format string parameters in your call to printf(), and replaced that call with a call to the (somewhat faster) puts(). If you’ll look closely, you’ll see that it also removed the newline from your string, because puts() appends a newline after printing the string it is given.

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

Sidebar

Related Questions

Call it OCD or an just obsessive need to separate logic from presentation, but
Call me stupid but I just can't find the installation directory for this program.
I call an action helper in one of my views using the following code
I am trying to understand the assembly level code for a simple C program
Call to a member function save() on a non-object in .../views/manufacturer/tmpl/edit.php line 24 which
A call of help from iOS developers out there. I am trying to recognize
call dword ptr __imp__VirtualProtect@16 What exactly is the @ doing? Is it just part
To call, for example, a function named makeRequest, I learned you need to do
I was just playing with the call stack, trying to change the return address
Call for jQuery experts :) http://s3.postimage.org/nb2mm7u2/download.png Here is what I need. I need each

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.