| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This replaces two custom allocators with mempool.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Define standard mempools reclaimed at various stages. Fix various
problems with the mempool allocator.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
A simple memory allocator which allows an arbitrary set of memory
allocations, followed by free-all-at-once for a particular pool, but
still without returning memory to the operating system (for speed.)
This should be faster than using malloc/free every time, even for good
malloc implementations.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Recent versions of gcc issue a couple of warnings, which may be real
bugs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
strncpy() is correctly used to fill in a zero-*padded* (not
zero-terminated) field in several places. Make gcc not complain about
those uses.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Fix dumb thinko in perm_alloc().
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
OFMT_KEEP_ADDR seems to not work properly. Now when we have proper
subsections, there is no need for that anymore.
This reverts commit 69ed82447a13a22e52a86a51a5657c7955a6767b.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.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>
|
|
|
|
|
|
| |
Add a test for subsections via symbols.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
MachO has this odd thing called "subsections via symbols", by which a
symbol can magically start what effectively is a new section. To
support this, add support for a calldown into the backend when a new
symbol is defined *at the current output location*, and allow it to
switch the current segment.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
"output" and "debug" are supposed to redirect to the current output
and debug formats. Fix it so it actually does.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
None of our symbols are available for a dynamic library, and if they
were, there would be no point in allowing them to be overridden. This
optimizes code generation for global symbols.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify the nasm_malloc() code by moving the pointer check into a
common subroutine.
We can now issue a filename error even for failures like malloc().
Add support for the gcc sentinel attribute (verify that a list ends
with NULL).
Add a handful of safe_alloc attributes.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
This reverts commit 69ed82447a13a22e52a86a51a5657c7955a6767b.
|
|
|
|
|
|
|
| |
-Werror now trips on implicit fallthroughs. There is also at least one
that probably should not be, although it appears to be harmless.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without the limit, the while loop opens to semi-infinite
that will exhaustively consume the heap space. Also, the
index value gets into the garbage.
https://bugzilla.nasm.us/show_bug.cgi?id=3392474
Reported-by : Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without relocation, the linker may do erroneous dead strip.
For the relocation, the conversion of addresses to RAWDATA
should be avoided for Mach-O.
https://bugzilla.nasm.us/show_bug.cgi?id=3392469
Reported-by: Andrew Fish <afish@apple.com>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though the size is set to 64-bit, actual value can be
in 32-bit range. In that case, the use of such absolute
address is prevented.
The side effect of 58d2ab17 is resolved.
https://bugzilla.nasm.us/show_bug.cgi?id=3392468
Reported-by: Richard Russell <rtrussell@gmail.com>
Reported-by: Michael Petch <mpetch@capp-sysware.com>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows Store and Xbox One apps need to pass WACK, the Windows App
Certification Kit, and part of that process involves a tool named
BinScope that checks the debug info of all object files making up
the final executable against a list of minimum versions.
These minimum versions get increased periodically as new SDKs and
compilers are released. In a patch 2 years ago, I made NASM
pretend it was MASM and output a then-current MASM version number.
Well, the minimum version number has increased again, and
periodically hardcoding a new random MASM version to keep BinScope
happy doesn't seem like the way to go.
It turns out that BinScope does not impose any minimum version
requirements on object files listing a source language BinScope
doesn't know about.
I have no idea how to officially request a new CodeView language
ID (or whether there even is a way to do so for someone outside
MS). But experimentally, using 'N' (0x4e) for NASM seems to be
working just fine and is far away from the range of currently
allocated language IDs (which stop at 0x10).
Long story short, make NASM emit a source language ID of 0x4e,
with the actual NASM version in the version number fields.
BinScope is happy to accept that, and since the language ID field
is purely an informational field in an optional debug info record
that (as far as I can tell) is not used for anything else, this
seems reasonably safe and unlikely to cause trouble.
Signed-off-by: Fabian Giesen <fabiang@radgametools.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
This reverts commit 8ba28e13ea4453a587d08e5533e60f4ff2b4781a.
|
|
|
|
| |
This reverts commit 8a7c6009fbddd7084fdfaebd9e3e3fd0baa39bc2.
|
|
|
|
| |
This reverts commit 8b211a0a3b87999ffe38d03ba1e01639bfc05db0.
|
|
|
|
|
|
|
| |
In sake of https://bugzilla.nasm.us/show_bug.cgi?id=3392465
Suggested-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
| |
This allows to mark global symbols as private external.
Similar to visibility hidden in ELF output.
Signed-off-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
https://bugzilla.nasm.us/show_bug.cgi?id=3392465
Reported-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
https://bugzilla.nasm.us/show_bug.cgi?id=3392465
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
In 51b453b0970a1d66c3f6533ed940cb9838ba2b18 occasionally
used wrong operand for sizeof.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
81b62b9f54ac8e4019a9b2ec2b95ec0faa86bd2a
These modules need a reference to input filename.
For example elf put into symbol table
| SYMBOL TABLE:
| 0000000000000000 l df *ABS* 0000000000000000 sha-64.asm
Otherwise this become empty string.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The call to iflag_clear_all has been occasionally dropped,
bring it back.
https://bugzilla.nasm.us/show_bug.cgi?id=3392466
Reported-by: sezeroz@gmail.com
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
https://bugzilla.nasm.us/show_bug.cgi?id=3392464
Reported-by: sezeroz@gmail.com
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Apparently OS/2 really wants \ as path separators, and that is really
the main target for OpenWatcom these days, so change the path
separator in this Makefile. For building on Linux we'd be better off
with a GNU Makefile anyway, but what is the point, really...
Reported-by: Andy Willis <abwillis1@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Resolved Conflicts:
version
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make it possible to generate variants of RET(F) with explicit operand
size specified without having to use o16/o32/o64.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some older versions of gcc (gcc 4.2.1 at least) produce a warning,
promoted to error, on C99 inlines. Do some work to figure out if we
need to fall back to GNU inline syntax.
Fix some issues with GNU inline syntax.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
* nasm-2.13.xx:
nasmlib: Drop pure_func attrib from seg_alloc
nasmlib: Drop unused seg_init
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It not only reads static variable but writes it back as well.
https://bugzilla.nasm.us/show_bug.cgi?id=3392461
Reported-by: Michael Šimáček <msimacek@redhat.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The helper has been eliminated in 2c4a4d5810d0a59b033a07876a2648ef5d4c2859
https://bugzilla.nasm.us/show_bug.cgi?id=3392461
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
New option --abort-on-panic to make debugging easier.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
NASM 2.13.03
Resolved Conflicts:
include/iflag.h
version
x86/insns-iflags.ph
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Some more information about 64-bit programming and its quirks.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The rarely used 64-bit absolute load instruction (what gas calls
movabsq) needs to be declared ABS if we are in relative mode, which is
normally the case.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are some gotchas in how immediates and pointers are loaded in
64-bit mode and how they interact with optimization. Document those
cases.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bullet points are considered paragraphs, so our documentation compiler
require an empty line between them.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | | |
|