473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I modify the name of the text section which is by default".text"

When C source code is compiled into an object file (.o), the functions
are put into the .text section.
Is it possible that I put all functions to a renamed text section
whose name may be ".text.app".

When linking several .o files into an executable, I need to put the
code of .o files into different positions(in MCU).
If I can rename the text section of object files, I can set different
section start addresses for each section.
Sep 11 '08 #1
2 1569
LinNan wrote:
When C source code is compiled into an object file (.o), the functions
are put into the .text section.
Is it possible that I put all functions to a renamed text section
whose name may be ".text.app".

When linking several .o files into an executable, I need to put the
code of .o files into different positions(in MCU).
If I can rename the text section of object files, I can set different
section start addresses for each section.

Some compilers support this. Please look the documentation of
the compiler system you are using.

If not, just generate an assembly listing, and
change the name of the section with an editor, then assemble
the file.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Sep 11 '08 #2
On Sep 11, 9:39*pm, jacob navia <ja...@nospam.comwrote:
LinNan wrote:
When C source code is compiled into an object file (.o), the functions
are put into the .text section.
Is it possible that I put all functions to a renamed text section
whose name may be ".text.app".
When linking several .o files into an executable, I need to put the
code of .o files into different positions(in MCU).
If I can rename the text section of object files, I can set different
section start addresses for each section.

Some compilers support this. Please look the documentation of
the compiler system you are using.

If not, just generate an assembly listing, and
change the name of the section with an editor, then assemble
the file.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32
I found that objcopy meets my need
Sep 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jochen Daum | last post by:
Hi ! If I have an input field <form ... method="post"> <input type="text" name="abc def"> </form>
2
by: Askari | last post by:
Hi, How do for do a "select()" on a CheckButton in a menu (make with add_checkbutton(....) )? I can modify title, state, etc but not the "check state". :-( Askari
3
by: Alfred E Neuman | last post by:
I've read that... AClass ac = AClass( "name", 23 ); is less efficient than... AClass ac( "name", 23 ); because the first has to create a temporary object which is then assigned to ac. ...
13
by: baumann.Pan | last post by:
when define char *p = " can not modify"; p ='b' ;is not allowed, but if you declare p as char p = "can modify"; p = 'b'; is ok? why?
3
by: Dave | last post by:
I've run across a strange error when creating a simple ADO.Net connection in VB.Net 2003 To replicate an error: Create an Access database (2002) with table named "Student" and fields SID...
1
by: A.M-SG | last post by:
Hi, I am trying to simplify my app.config file. Can I have a section handler in a separated file? I am looking for something like this: <section name=".." type=".." file="..."> but it...
13
by: dhughey | last post by:
I am using <script type="text/javascript"> function setAction(frm){ act = ''; for(x=0;x<frm.se.length;x++){ if(frm.se.checked){ act = frm.se.value; } }
1
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form...
5
by: Ion | last post by:
Hi, I get SQL0746N when trying to call stored procedure. In my particular case I the message complains about operation "READ", but I'm posting a simplified version that results in SQL0746N with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.