This change may have backward compatibility issue but
most probably the sane program never used sections with
base address less then instruction alignment.
Note that alignment may only increase which means if a
section is aligned on 2^5 the align 2^4 will not affect
the section.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We already have "elf" and "macho" aliases for respective
32 bit output formats. Make the same for "win32" in a
sake of consistency.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
nasm_opt_val should be able handle various text stream
passed, including tainted ones. Make it so.
Also it fixes the case when Elf section has multiple
attributes such as "progbits align=16" and friends
(introduced by commit bb0745f). The former just ignore
any other options/values except first one.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
- no need to split functions even if it a bit longer
then 80 characters, it becomes hard to read it
- initialize "thead" before "tail" is more natural
- use more simple while() instead of for() with a
long initializer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This allow us to keep compatibility layer without
needing the separated struct ofmt for this and
elf_init_hack routine.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In case if we can't open "malloc.log" for writing
we should not hang out but rather switch to stderr
and continue processing.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We need to compensate the index for two specials, not just one. While
we're at it, actually derive the number of specials from the list.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Distinguish the case of no directive present (D_none) from the case of
an unknown specified directive (D_unknown). This is reflected in
different error messages.
Furthermore, change the special case symbols to lower case in case we
ever have a directive called [none] or [unknown].
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
The former changes have been committed to binutils.
From initial message:
|
| 2010-03-22 Quentin Neill <quentin.neill@amd.com>
| Sebastian Pop <sebastian.pop@amd.com>
|
| opcodes/
| * i386-dis.c (OP_LWP_I): Removed.
| (reg_table): Do not use OP_LWP_I, use Iq.
| (OP_LWPCB_E): Remove use of names16.
| (OP_LWP_E): Same.
| * i386-opc.tbl: Removed 16bit LWP insns. 32bit LWP insns
| should not set the Vex.length bit.
| * i386-tbl.h: Regenerated.
|
| gas/
| * testsuite/gas/i386/x86-64-lwp.s: Remove use of 16bit LWP insns.
| * testsuite/gas/i386/lwp.s: Same.
| * testsuite/gas/i386/x86-64-lwp.d: Updated.
| * testsuite/gas/i386/lwp.d: Updated.
|
So there is no 16 bit instructions anymore.
Also xop.l field should be set to 0.
Based on patch from nasm64developer
Reported-by: nasm64developer
Signed-off-by: nasm64developer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Check if the offset and the representation are equivalent.
Disallow REL on absolute addresses.
I'm not sure what that would mean and the output formats don't support it.
Warn about ignored displacement size modifiers.
Due to previous commit empty line was occasionally
removed which make text harder to read. Restore it.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In case if the commiter has a main repo configured as remote
one and also has various tags (and don't want to push every
tag he has out to the main repo) he may use misc/tag-release
new functionality.
For example I have NASM remote repo as well known
git://repo.or.cz/nasm.git
and a number of my own local tags/branches which I
would like to not sprinkle into a master repo.
So to make a release (say 2.08) I may just type
misc/tag-release 2.08 git+ssh://xxx@repo.or.cz/srv/git/nasm.git master
and this command will push master branch into main repo with "nasm-2.08" tag.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We decided to defer recursive macro support
for now.
Hope this is the last RC before 2.08 final release.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We've a problem in supporting [i]rmacro, exitmacro
facilities at moment.
In a sake of not holding new NASM release any longer these
directives are just marked as being "forbidden".
This allow us to not squash much changes in current source
code base but remain on a safe side same time.
Reviewed-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In case if label is local and exceed maximum allowed length
we get NULL dereference. Fix it and warn a user about an accident.
Note that we don't print identifier itself since we know it's too
big. Line number of error is enough.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This reverts commit 3012d5d430.
nasm64developer pointed out that we still have this
limit in label.c (IDLEN_MAX).
Reported-by: nasm64developer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
It's really hard to read the code which is
terribly messed in tabs\spaces. Fix it all
at once. It's dirty work but has to be done
once.
No change on binary level.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We always allocate enough memory to hold identifiers
with any length. So lets remove restriction from
documentation.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>