Re: ELF instruction for section and branch.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Gagneet Singh" <gagneet@xxxxxxxxx> 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.html#Section

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux