Re: Understanding assembly in linux kernel

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

 



On Tue, Jan 29, 2008 at 04:42:49PM +0530, Chetan Nanda wrote:
> Hi,
> I am reading linux kernel code (i386/kernel/entry.S) it contains few
> assembly instruction like:
> 
> .section __ex_table,"a"
> 	.align 4
> 	.long 1b,syscall_fault
> .previous
> .section .fixup,"ax"
> .section .rodata,"a"
> .pushsection
> .popsection
> etc ....
> 
> How to understand these assembly statements. Please provide me some
> pointers to it.

These aren't assembly instructions, but assembler/linker stuff.

Run "info gas", or your favourite info viewer, and search for those
words.

E.g.:
7.81 `.previous'
================

This is one of the ELF section stack manipulation directives.  The
others are `.section' (*note Section::), `.subsection' (*note
SubSection::), `.pushsection' (*note PushSection::), and `.popsection'
(*note PopSection::).

   This directive swaps the current section (and subsection) with most
recently referenced section (and subsection) prior to this one.
Multiple `.previous' directives in a row will flip between two sections
(and their subsections).

   In terms of the section stack, this directive swaps the current
section with the top section on the section stack.

-- 
Luciano Rocha <luciano@xxxxxxxxxxx>
Eurotux Informática, S.A. <http://www.eurotux.com/>

Attachment: pgpSKfvQ9vkFL.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux