NASM convention is to use all-upper-case for "real" information, and
mixed-case (upper case common prefix, lower case description) for
meta-information. This is a highly useful distinction.
Thus "LBL_NONE" implies an actual label of type "NONE", as opposed to
no label at all.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Currently, NASM always issues as an unknown symbol any symbol declared
EXTERN. This is highly undesirable when using common header files,
as it might cause the linker to pull in a bunch of unnecessary
modules, depending on how smart the linker is.
Add a new REQUIRED directive which behaves like the old EXTERN, for
the use cases which might still need this behavior.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
In order to support Mach-O better, add support for subsections, as
used by Mach-O "subsections_via_symbols". We also want to add
infrastructure to support this by downcalling to the backend to
indicate if a new subsection is needed.
Currently this supports a maximum of 2^14 subsections per section for
Mach-O; this can be addressed by adding a level of indirection (or
cleaning up the handling of sections so we have an actual data
structure.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Global variables need to be declared in a header file; "extern" in C
files should be used extremely rarely (it is OK at least for now for
macro tables as they are generally only ever used in one specific
location, but otherwise, no.)
In a few cases the global variables were actually function-local!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>