Re: include/asm

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 20 Sep 1999 04:40:22 +0200


wu_yb wrote:
> There are following codes in inculde/asm/spinlock.h
> "lock; btsl $0, %0
> jc 2f
> .section .text.lock, "ax"
> ...
> .previous"
>
> Is the ".text.lock" a subsection of section ".text", the manual
> of GAS just told me that a subsection is of format ".text 0", not
> .text.lock,
> Does ".previous" refer the previous code section, I can't
> find such directive in GAS manual.

`.text.lock' is simply the name of a section, like `.text' or `.data' or
`.gnu.warning'. It is not a subsection: ELF doesn't have subsections.

It's conventional to use dots to separate words like that as it is
suggestive of some kind of hierarchy. And GNU linker scripts allow
wildcards so that you can say "link all sections name `.text.*' into
`.text'", if you want.

`.previous' means switch back to the previous section. So you can write
code like in Linux. It wasn't documented when Linus started using it,
and it still isn't. I'm surprised. Anyone is welcome to send a
documentation patch to <bug-gnu-utils@gnu.org>.

have a nice day,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/