Commit graph

2209 commits

Author SHA1 Message Date
Anonymous Maarten
baa3b160ce
Don't output absolute output path in binfmt mapfile for tests (#305) 2026-07-20 22:31:42 -07:00
Anonymous Maarten
430e4f55c0
subminor of a macho buildversion is optional (#304)
This fixes a difference in behavior between yasm built by autotools and cmake (due to different compile flags)
2026-07-20 22:30:44 -07:00
Anonymous Maarten
74d88e80be
cmake: add build dependency of the frontends to yasmstd and add its directory to RUNPATH (#302) 2026-07-20 22:30:19 -07:00
Anonymous Maarten
3199a84f0c
Ensure all reference hex files have trailing spaces (#303) 2026-07-20 22:29:56 -07:00
Anonymous Maarten
1f09fa089d
cmake: register all modules in yasm_init_plugin (#301)
Some modules were not registered when dynamically loading yasmstd.
2026-07-20 22:29:03 -07:00
Anonymous Maarten
7b15cffe2d ci: build CMake project on GitHub actions 2026-07-21 00:27:26 -05:00
Anonymous Maarten
9361f783cf ci: bump dependencies + prepare for CMake build 2026-07-21 00:27:26 -05:00
Yao Zi
a2f8bdf075 dwarf2: Correctly initialize dwarf2_line_info.errwarns
Forgetting to this causes unexpected control flow transfers and even
misoptimizations. When building with LLVM 20.1.4 and LTO enabled,
misoptimizations will ultimately lead to segfaults in
dwarf2_gen64_test.sh.

Signed-off-by: Yao Zi <ziyao@disroot.org>
2026-01-03 16:18:40 -08:00
jca
b9c3fe6399 Add support for endbr32/endbr64 (#156) 2026-01-03 13:46:44 -08:00
jca
e2c133fe29 Add support for four bytes instructions 2026-01-03 13:46:44 -08:00
haruki3hhh
121ab150b3
Fix null pointer dereference in yasm_section_bcs_append (#263) 2024-06-24 16:08:27 -07:00
dataisland
9defefae9f
Fix null-pointer-dereference in yasm_expr_get_intnum (#244) 2023-09-21 22:21:20 -07:00
dataisland
ecb47f1c87
Fix handle_dot_label heap-out-of-bound (#243) 2023-09-21 22:21:10 -07:00
dataisland
84be2ee6c3
Fix use-after-free in yasm_intnum_destroy (#242) 2023-09-21 22:20:58 -07:00
Kent Ross
1f63a45d24
Fix misleading indentation (#132) 2023-09-21 22:05:25 -07:00
dataisland
0dfac4d4da
Fix nullptr deref in yasm_expr__copy_except (#241) 2023-09-21 22:04:21 -07:00
Andrei Karas
721134a8ae
Fix memory leak if masm mode enabled in parsers (#239) 2023-09-21 22:04:09 -07:00
Andrei Karas
dfc1c9e841
Fix access field adress on null pointer in x86bc.c (#238) 2023-09-12 15:21:23 -07:00
Peter Johnson
2cd3bb50e2
elf.c: Fix NULL deref on bad xsize expression (#234) 2023-06-30 08:08:55 -07:00
PoroCYon
4dc8c3bf03
Add support for NASM %warning preprocessor directive (#232)
Regular NASM supports this, while Yasm doesn't seem to. This fixes the
discrepancy.
2023-06-17 23:44:01 -07:00
Katsuhiko Gondow
b2cc5a1693
Fix memory leak in bin-objfmt (#231) 2023-06-12 13:00:47 -07:00
Biswapriyo Nath
f79f5e37f0
Fix function declaration warnings with clang (#226)
This fixes the following compiler warnings with clang

tools/genperf/perfect.c:65:6: warning: a function definition without a prototype
is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]

frontends/yasm/yasm.c:1379:23: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]

modules/objfmts/elf/elf.c:225:18: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
2023-05-17 15:23:32 -07:00
Biswapriyo Nath
22da04ee0d
CI: update GitHub Actions version (#225)
Node.js 12 actions are deprecated. For more information see:
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2023-05-17 12:07:24 -07:00
Biswapriyo Nath
e69fba2db0
Fix missing yasm_xfree function declaration (#224)
This fixes the following compiler error in macOS in CI.

libyasm/tests/bitvect_test.c:112:5: error: implicit declaration of
function 'yasm_xfree' [-Werror,-Wimplicit-function-declaration]
2023-05-14 11:03:04 -07:00
Ulya Trofimovich
811f24d0bf
GAS preprocessor: don't cut comments inside of string literals. (#81) 2023-05-12 21:23:13 -07:00
bird2tori
241bf4c42c
More makedep features (#80)
yasm.c: Added -MD, -MT and -MP options similar to gcc. Also added --makedep-dos2unix-slash for helping users of NUG make (and similar) on Windows. The -MD option does both assembling and Makefile dependency generation in one go, which convenient and a little quicker.

nasm-preproc.c: Have to always gather dependencies to support -MD. Minimal cost.

Co-authored-by: knut st. osmundsen <bird-skylake@anduin.net>
2023-05-12 21:22:36 -07:00
mackyle
563a03be81
libyasm/section.c: support gas .private_extern directive (#138)
Support for "private_extern" was previously added for nasm mode via
a declaration like so:

    global foo:private_extern
    foo:
             ; codes

However, that same code in gas format looks like this:

    .private_extern foo
    foo:
             # codes

Add support for the gas version of "private_extern" syntax by
supporting a new gas `.private_extern` directive that actually
has exactly the same semantics as the nasm `global ...:private_extern`
directive.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
2023-05-12 21:20:12 -07:00
Duncan Ogilvie
8b6c7b237c
Fix allocator mismatch (#107) 2023-05-12 21:19:37 -07:00
Scott Furry
e9badc5a77
Python 2 to 3 migration - m4 folder (#144)
Update cython.m4 and pythonhead.m4 files to be compatible with py2/3

pythonhead.m4 changes taken from:
  https://raw.githubusercontent.com/posborne/dbus-python/master/m4/am-check-python-headers.m4

cython.m4 changes taken from:
  https://raw.githubusercontent.com/alisw/rivet/master/m4/cython.m4
2023-05-12 21:18:39 -07:00
Kaz Wesley
8a87860db7
Enable AES on westmere (#97)
Prior to this change: cpu_lcd(['AVX'], ['AVX','AES']) == ['AVX'],
causing AES instructions to be treated as unsupported when "cpu
WESTMERE" is used, or even "cpu WESTMERE AES".

Fixed by reordering ordered_cpu_features such that now,
cpu_lcd(['AVX'], ['AVX','AES']) == ['AES']. I don't know if there are
CPUs this would not be correct for, but this is the value that's
consistent with all extant CPU definitions.
2023-05-12 21:18:15 -07:00
Peter Meerwald-Stadler
f2f9f157df
Allow sha256rnds2 to have memory as 2nd operand (#108) 2023-05-12 21:17:09 -07:00
James Touton
468014643d
Added missing config vars to config.h.cmake. (#160) 2023-05-12 21:16:49 -07:00
squidcc
3bbfd9d8f9
Fix 128-bit variant of VPBLENDVB incorrectly marked as AVX2 instead of AVX (#112) 2023-05-12 21:16:26 -07:00
kalebskeithley
0799f381d5
Update elf-objfmt.c (#148) 2023-05-12 21:15:02 -07:00
Matthieu Darbois
ce56a6f924
Fix test failure introduced in 51af4082cc (#145)
modules/arch/x86/tests/x86_test.sh failed after 51af4082cc commit.
This fixes this test.
2023-05-12 21:14:32 -07:00
Fighter19
529c14bfdc
Fix badly freed pointer on indented code block after rept (#189) 2023-05-12 21:13:44 -07:00
cryptobro
fa9e004383
gas preproc: Fix UB/crashes (#186) 2023-05-12 21:12:54 -07:00
Peter Meerwald-Stadler
93a960bc7d
Fix memleak of codeview leaf (#114) 2023-05-12 21:10:17 -07:00
liuxiang88
bfe1bc257d
Add EM for loongarch (#192) 2023-05-12 21:08:50 -07:00
Ismo Puustinen
61e374f247
Remove __DATE__ from version strings (#198)
Having __DATE__ is causing compilation errors when it's defined by Bazel
build tool like this: -D__DATE__=redacted
2023-05-12 21:07:35 -07:00
Biswapriyo Nath
a277a590f0
Fix detecting Windows platform (#204)
This replaces _MSC_VER macro with _WIN32 because the
former one is for MSVC and Visual Studio only and is
not defined in mingw environment. Wherease, _WIN32
macro is the proper way to check Windows platform
irrespective of compiler toolchain.

See the following official link for more info
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros
2023-05-12 21:06:53 -07:00
Siddhesh Poyarekar
05a52bab75
Introduce a security policy and add text to the README (#223)
Add a SECURITY.md that disclaims almost all bugs as security issues.
2023-05-12 21:06:18 -07:00
MonicaLiu
101bca9ca8
Add vcpkg installation instructions (#200)
Co-authored-by: Monica <v-liumonica@microsoft.com>
2022-09-14 16:38:24 -07:00
Brian Gladman
ffbd22cdc9 Merge branch 'master' of https://github.com/yasm/yasm 2022-01-27 16:26:06 +00:00
Brian Gladman
9d02e0f49d Update Visual Studio build to Visual STudio 2022 2022-01-27 16:25:55 +00:00
Peter Johnson
41762bead1
Update Mach-O for newer macOS (#180)
- Create a dummy .llvmasm section for bitcode
- Add [buildversion] directive for setting minos and sdk versions, e.g. [buildversion minos="10.14" sdk="10.14"]. This defaults to 10.5 on x64 and 10.4 on x86.
2021-07-10 12:12:45 -07:00
Peter Johnson
d938d97505
Add GitHub CI build workflow (#179) 2021-07-09 14:49:16 -07:00
Peter Johnson
3e74376b56
Do not use AC_HEADER_STDC (#178)
This fixes compatibility with autotools 2.70+
2021-07-09 14:02:37 -07:00
Peter Johnson
f01afb6b51
Fix test failures (#177)
These were caused by the addition of the segreg-in-64bit warning.
2021-07-09 13:42:53 -07:00
Brian Gladman
009450c7ad minor update to VS2019 build 2020-07-27 17:01:46 +01:00