This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to control location of startup code?


> 
> >> Is there any way to control how the default startup code ends up in
>    the output file/the virutal address it gets and/or what output
>    section it's included in?
> 
> I do it by putting it in a seperate segment. More specifically, I have
> my own "crt0.s" it contains the reset vector and other IRQ like things
> below is the relavent snippit in ARM assembly
> 
> 
> >> 	.section	.vectors
[...]
> The *PROBLEM* with this is by default the '.vectors' segment is not
> tagged as loadable perhaps there is a way to do this in GAS, it was
> not obvious to me.
> 

You need to set the section flags when you create the section, something 
like:

	.section .vectors, code, "ax"

which tells the assembler that the section contains code, has to be 
_A_llocated at load time and is e_X_ecutable.

R.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]