Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

Unix

Unix v6

end(3)



end, etext, edata last locations in program

extern

end;

extern

etext;

extern

edata;

These names refer neither to routines nor to locations with interesting contents. Instead, their addresses coincide with the first address above the program text region above the initialized data region or uninitialized data region The last is the same as the program break. Values are given to these symbols by the link editor (I) when, and only when, they are referred to but not defined in the set of programs loaded. The usage of these symbols is rather specialized, but one plausible possibility is

extern end;

...

... = brk(&end+...);

(see (II)). The problem with this is that it ignores any other subroutines which may want to extend core for their purposes; these include (see (II)), (III), and also secret subroutines invoked by the profile (−p) option of Of course it was for the benefit of such systems that the symbols were invented, and user programs, unless they are in firm control of their environment, are wise not to refer to the absolute symbols directly. One technique sometimes useful is to call which returns the value of the current program break, instead of referring to which yields the program break at the instant execution started. These symbols are accessible from assembly language if it is remembered that they should be prefixed by ‘’ break (II), alloc (III)



end(3)