0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

Merge branch 'nasm-2.15.xx'

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2020-10-10 13:53:50 +03:00
commit d06a193750
53 changed files with 67 additions and 58 deletions

View File

@ -7,6 +7,11 @@
The NASM 2 series supports x86-64, and is the production version of NASM
since 2007.
\S{cl-2.15.06} Version 2.15.06
\b Fix object and header length in \c{rdf} format.
It is been broken in 2.13.xx series.
\S{cl-2.15.05} Version 2.15.05
\b Fix \c{%ifid $} and \c{%ifid $$} incorrectly being treated as

View File

@ -612,8 +612,8 @@ int rdfwriteheader(FILE * fp, rdf_headerbuf * h)
l = membuflength(h->buf);
l2 = l + 14 + 10 * h->nsegments + h->seglength;
fwriteint32_t(l, fp);
fwriteint32_t(l2, fp);
fwriteint32_t(l2, fp); /* object length */
fwriteint32_t(l, fp); /* header length */
membufdump(h->buf, fp);

View File

@ -117,7 +117,7 @@ if args.cmd == None:
def read_stdfile(path):
with open(path, "rb") as f:
data = f.read().decode("utf-8").strip("\n")
data = f.read().decode("utf-8")
f.close()
return data
@ -182,7 +182,7 @@ def read_json(path):
try:
with open(path, "rb") as f:
try:
desc = json.loads(f.read().decode("utf-8").strip("\n"))
desc = json.loads(f.read().decode("utf-8"))
except:
desc = None
finally:
@ -297,8 +297,8 @@ def show_diff(test, patha, pathb):
pb = run_hexdump(pathb)
if pa == None or pb == None:
return test_fail(test, "Can't create dumps")
sa = pa.stdout.read().decode("utf-8").strip("\n")
sb = pb.stdout.read().decode("utf-8").strip("\n")
sa = pa.stdout.read().decode("utf-8")
sb = pb.stdout.read().decode("utf-8")
print("\t--- hexdump %s" % (patha))
for i in sa.split("\n"):
print("\t%s" % i)
@ -361,8 +361,11 @@ def exec_nasm(desc):
test_fail(desc['_test-name'], "Unable to execute test")
return None
stderr = pnasm.stderr.read(4194304).decode("utf-8").strip("\n")
stdout = pnasm.stdout.read(4194304).decode("utf-8").strip("\n")
#
# FIXME: For now 4M buffer is enough but
# better provide reading in a cycle.
stderr = pnasm.stderr.read(4194304).decode("utf-8")
stdout = pnasm.stdout.read(4194304).decode("utf-8")
pnasm.stdout.close()
pnasm.stderr.close()

View File

@ -1 +1,2 @@
mout.bin: fatal: more than one output file specified: mout.bin