Put in all constants pecoff v8 states. Most probably we
will never need most of them but lets have them here for
completeness.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Add ilog2_{32,64}() and alignlog2_{32,64}() ... the latter is intended
for alignment statements and return -1 for non-power-of-2 other than 0
(which returns 0).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Achieved via sectalign call. Note that not all output
targets (ie formats) may handle sectalign yet, most
of them just ignore this entity.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
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.