Delan Azabani 5b730a197a out: maco64 -- Fix erroneously small write for OUT_REL4ADR
Ensure that the int64_t offset value, which ultimately comes from an
int64_t value in gencode() (assemble.c:1906), is completely written to
the temporary buffer, instead of merely its least significant 32 bits.

Prior to this change, WRITELONG was used instead of WRITEDLONG, which
resulted in add_reloc being passed an int64_t "reloff" whose least
significant 32 bits were those from the aforementioned offset value,
and whose most significant 32 bits were stack garbage from "mydata".

This led to get_closest_section_symbol_by_offset() attempting to search
for extremely large values of "offset" among the symbols in "syms",
which meant that the last symbol with a matching section number would
always win the symbol search.

In effect, this clobbered the resultant relocation information, such
that all entries would be resolved with the same symbol.

Test output can be found here

https://www.azabani.com/patch/2/output.txt

This patch fixes

http://bugzilla.nasm.us/show_bug.cgi?id=3392306

Signed-off-by: Delan Azabani <delan@azabani.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-02 13:22:32 +03:00
2015-05-24 12:59:11 +03:00
2010-04-25 12:02:38 +04:00
2010-04-01 01:17:00 +04:00
2014-05-09 22:22:34 +04:00
2009-09-14 23:17:03 +04:00
2014-05-21 08:30:40 -07:00
2010-11-07 17:31:27 +01:00
2008-04-10 14:54:02 -07:00
2007-11-25 14:25:13 -08:00
2014-11-25 12:14:52 -08:00
2010-06-15 10:47:16 -07:00
2013-06-30 01:31:15 +04:00
2009-10-13 19:41:37 +04:00
2010-04-22 11:02:56 -07:00
2014-11-30 00:21:17 +03:00
2002-04-30 21:09:12 +00:00
2014-11-25 12:14:52 -08:00
2010-07-28 18:00:18 +04:00
2010-08-12 20:15:27 -07:00
2014-10-16 16:31:31 -07:00
2011-07-15 23:13:26 +04:00
2013-04-20 20:24:01 +04:00
2014-11-25 09:44:00 -08:00
2014-10-21 12:50:47 -07:00
2014-05-09 22:22:34 +04:00
2010-11-07 17:20:23 +01:00
2013-06-30 01:31:15 +04:00
2014-10-21 12:50:47 -07:00
2013-12-04 20:10:08 -08:00
2013-09-21 13:14:15 +04:00
2010-10-03 21:02:08 +04:00
2009-12-22 23:42:03 +03:00
2015-02-23 12:04:39 +03:00

              NASM, the Netwide Assembler.

Many many developers all over the net respect NASM for what it is
- a widespread (thus netwide), portable (thus netwide!), very
flexible and mature assembler tool with support for many output
formats (thus netwide!!).

Now we have good news for you: NASM is licensed under the "simplified"
(2-clause) BSD license.  This means its development is open to even
wider society of programmers wishing to improve their lovely
assembler.

The NASM project is now situated at SourceForge.net, the most
popular Open Source development site on the Internet.

Visit our website at http://nasm.sourceforge.net/ and our
SourceForge project at http://sourceforge.net/projects/nasm/

See the file CHANGES for the description of changes between revisions,
and the file AUTHORS for a list of contributors.

                                                   With best regards,
                                                           NASM crew.
Description
No description provided
Readme BSD-2-Clause 10 MiB
Languages
Assembly 61.7%
C 31.7%
Perl 3.2%
Makefile 0.8%
M4 0.7%
Other 1.9%