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 7670333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:47:55+00:00 2026-05-31T15:47:55+00:00

I am not clearly understanding how sections (declared using section directive) in an assembly

  • 0

I am not clearly understanding how sections (declared using section directive) in an assembly program are handled by the assembler and the linker. Following are are some of the queries :

  • What is the use of user-defined sections (sections other than the standard .text, .data, .bss) ?

  • What if I put code in data section and data in code section? How does the assembler handle it ?

  • If no sections are declared in the program what will the assembler do?

  • If only user defined sections are declared(no text,data and bss) what will the assembler do?

I know I can write assembly programs to test if a program will work in each case but I want to get the concept clear.

  • 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-31T15:47:57+00:00Added an answer on May 31, 2026 at 3:47 pm

    Sections are no more than independent memory sequences. Each new byte of data is placed into the currently open “program section”. It is quite convenient while writing a function to have the associated data quite close in the source code, even though when it is loaded into memory it might be megabytes or gigabytes distant.

    User defined program sections work the same way as the standard sections, though you will usually have to provide additional information to the linker and other code post-processing tools so that they are loaded into memory in a sensible way.

    You can place executable code in a data section and vice versa, and most assemblers will not even warn about it. Executing code from a data section might require a little trickery; the reverse is usually easy.

    Assemblers handle sections typically by writing the equivalent into the object module in the same order as the source code, leaving the rearrangement of like sections together to the linker. Only the most simplistic assemblers don’t provide this ability. The original MSDOS .COM file assembler comes to mind.

    Different assemblers have different philosophies about coddling the programmer. The traditional tactic is to assume that an assembly language programmer knows what they are doing, and doing literally what is written except what is not understood. Other assemblers are more helpful (or a pain in the ass, depending on your point of view), and complain about misaligned multi-byte structures, data or code type mismatches, etc., etc.

    Based on the “helpfulness” of an assembler, failure to initiate a program section results in default behaviour (usually an assumed code .psect), or refusal to assemble with a fatal error. Even the most structured assembler does not care if there is no text, data, or bss. In fact, there are useful object modules consisting only of symbol definition with no data (or code) bytes at all.

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

Sidebar

Related Questions

I know I need to use Template Columns, but I am not clearly understanding
I am really stuck on this. I'm clearly not understanding the MIN/MAX concept. I
The Django documentation states the following clearly: Not every template in contrib\admin\templates\admin may be
I am clearly not understanding how to do this correctly, can someone set me
http://code.google.com/appengine/docs/python/tools/uploadingdata.html is not clearly understand. Where i should call the bulkloader.py or appcfg.py? Should
This is clearly not appears like it wouldn't be a best practice. Can someone
Clearly, when GROUP BY clause used, columns that are not aggregate function should be
I cannot figure out why it's still not recognizing jQuery syntax when I clearly
First, I'm not sure I really understand what a selector is. From my understanding,
I'm using a bytea type in PostgreSQL, which, to my understanding, contains just a

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.