472,325 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,325 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 1476
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...
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...
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)...
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: ...
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 =...
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...
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...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

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.