ELF instruction for section and branch.

Gagneet Singh gagneet@acmet.com
Wed Dec 24 11:15:00 GMT 2003

Thank for the info, will just look it up.

I tried with the MIPS ELF output but was unable to get the desired
result. Even after compiling with GCC using the GCC port to the desired

The architecture I am using defines a section by the name '.text', but
if I try to make another section named '.text1' or anything similar it
issues an error saying "secbr.s:93: Error: Unknown pseudo-op:

What can be the reason for this, does it mean that only one section can
be specified or is it that the section definition should have '.text'
preceding it. And the section is defined as a name of the function??


> -----Original Message-----
> From: Ian Lance Taylor [mailto:ian@wasabisystems.com] 
> Sent: Saturday, 20 December, 2003 21:09 PM
> To: gagneet@acmet.com
> Cc: gcc@gcc.gnu.org; gcc-help@gcc.gnu.org
> Subject: Re: ELF instruction for section and branch.
> "Gagneet Singh" <gagneet@acmet.com> writes:
> > So it would appear that we will not be able to generate ELF branch 
> > across sections in MIPS architecture. But, is it possible for ELF 
> > architecture as such, or
> > 
> > "official ELF spec does not define a suitable relocation"
> > 
> > the above statement holds true for any architecture with 
> ELF output. 
> > If I wish to compile and link the example in the x86 
> architecture with 
> > ELF format as output, how will I do that and specially is that 
> > possible??
> Any statement about whether a suitable relocation is 
> available in ELF is specific to a particular architecture.
> You should be able to do cross-section jumps using i386 ELF.  
> The i386 branch instructions are simple 32-bit relocations, 
> which are available in i386 ELF.
> > Also, does GCC define sections in the assembly file as '.section 
> > .text1' or is this example specific to an architecture??
> It's specific to a particular target, though that particular 
> form is quite common.  When using gas, see:
> http://sources.redhat.com/binutils/docs-2.12/as.info/Section.h


More information about the Gcc-help mailing list