Chapter 8. Assembler Directives
65
.stabs string , type , other , desc , value
All five fields are specified.
8.87.
.string
"
str
"
Copy the characters in
str
to the object file. You may specify more than one string to copy, separated
by commas. Unless otherwise specified for a particular machine, the assembler marks the end of each
string with a 0 byte. You can use any of the escape sequences described in Section 4.6.1.1 Strings.
8.88.
.struct expression
Switch to the absolute section, and set the section offset to
expression
, which must be an absolute
expression. You might use this as follows:
.struct 0
field1:
.struct field1 + 4
field2:
.struct field2 + 4
field3:
This would define the symbol
field1
to have the value 0, the symbol
field2
to have the value 4,
and the symbol
field3
to have the value 8. Assembly would be left in the absolute section, and you
would need to use a
.section
directive of some sort to change to some other section before further
assembly.
8.89.
.subsection name
This is one of the ELF section stack manipulation directives. The others are
.section
(Section
8.78
.section name
),
.pushsection
(Section 8.73
.pushsection name, subsection
),
.popsection
(Section 8.68
.popsection
), and
.previous
(Section 8.67
.previous
).
This directive replaces the current subsection with
name
. The current section is not changed. The
replaced subsection is put onto the section stack in place of the then current top of stack subsection.
8.90.
.symver
Use the
.symver
directive to bind symbols to specific version nodes within a source file. This is only
supported on ELF platforms, and is typically used when assembling files to be linked into a shared
library. There are cases where it may make sense to use this in objects to be bound into an application
itself so as to override a versioned symbol from a shared library.
For ELF targets, the
.symver
directive can be used like this:
.symver name, name2@nodename
If the symbol
name
is defined within the file being assembled, the
.symver
directive effectively
creates a symbol alias with the name
name2@nodename
, and in fact the main reason that we just
don't try and create a regular alias is that the
@
character isn't permitted in symbol names. The
name2
part of the name is the actual name of the symbol by which it will be externally referenced. The name
name
itself is merely a name of convenience that is used so that it is possible to have definitions for
multiple versions of a function within a single source file, and so that the compiler can unambiguously
know which version of a function is being mentioned. The
nodename
portion of the alias should be
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved