Jakub Konka
2cf1c1b96b
macho: honor verbose_link when linking with zld
2021-03-18 11:10:09 +01:00
Jakub Konka
861ea64009
macho: remove now obsolete LLD fixups
2021-03-18 11:09:47 +01:00
Jakub Konka
7516dfff83
zld: use zld when linking aarch64 by default and cross-comp
2021-03-18 00:37:13 +01:00
Jakub Konka
900658a85d
rebase with master
2021-03-17 20:05:29 +01:00
Jakub Konka
1ec620be62
zld: fix GOT loads and indirection on x86_64
2021-03-17 19:59:57 +01:00
Jakub Konka
ac0c669473
zld: add/fix more issues
...
* fix debug info for static archives
* allow handling of empty object files
* fix some relocs for GOT loads
2021-03-17 19:59:13 +01:00
Jakub Konka
de209afbba
zld: fix TLV initializers
2021-03-17 19:59:13 +01:00
Jakub Konka
349f878ecf
zld: mimick Apple and add __DATA_CONST seg
2021-03-17 19:59:13 +01:00
Jakub Konka
62f43fbc06
zld: clean up use of commands.zig module
2021-03-17 19:59:13 +01:00
Jakub Konka
d484b3b3cb
zld: use aarch64 for opcodes
2021-03-17 19:59:13 +01:00
Jakub Konka
dc34ac2b9e
zld: fix incorrect offset calc for DICE
2021-03-17 19:59:13 +01:00
Jakub Konka
5d8944edc1
Revert log.warn hack
2021-03-17 19:59:13 +01:00
Jakub Konka
a1b0ec5277
zld: start bringing x64 up to speed
2021-03-17 19:59:13 +01:00
Jakub Konka
066c1386a3
zld: demote logs from warn to debug
2021-03-17 19:59:13 +01:00
Jakub Konka
b0ee480177
zld: merge and sort sections
2021-03-17 19:59:13 +01:00
Jakub Konka
44ebf48631
zld: fix handling of section alignment
2021-03-17 19:59:13 +01:00
Jakub Konka
7c22f4f851
zld: pass test-std and test-compiler-rt
2021-03-17 19:59:13 +01:00
Jakub Konka
7cbdbab376
zld: differentiate locals from globals
2021-03-17 19:59:13 +01:00
Jakub Konka
7e32947871
zld: add nop to reloc module
2021-03-17 19:59:13 +01:00
Jakub Konka
d2008db623
zld: bullet-proof stubs for long jumps
2021-03-17 19:59:13 +01:00
Jakub Konka
14590795b1
zld: cleanup section alignment when allocating
2021-03-17 19:59:13 +01:00
Jakub Konka
586c704212
zld: pass stage2 tests linked with zld!
2021-03-17 19:59:13 +01:00
Jakub Konka
e825a15b05
zld: replace ldr with add if indivisible
2021-03-17 19:59:13 +01:00
Jakub Konka
f52f23618d
macho: start upstreaming zld
2021-03-17 19:59:13 +01:00
Jakub Konka
0f7b036eb7
Merge pull request #8281 from kubkon/macho-got-refactor
...
stage2+macho: refactor global offset table for incremental linker
2021-03-17 19:44:32 +01:00
Frank Denis
119fc318a7
std/crypto/chacha20: add round-reduced versions & cleanup internals
...
See https://eprint.iacr.org/2019/1492.pdf for justification.
8 rounds ChaCha20 provides a 2.5x speedup, and is still believed
to be safe.
Round-reduced versions are actually deployed (ex: Android filesystem
encryption), and thanks to the magic of comptime, it doesn't take much
to support them.
This also makes the ChaCha20 code more consistent with the Salsa20 code,
removing internal functions that were not part of the public API any more.
No breaking changes; the public API remains backwards compatible.
2021-03-17 11:25:51 -07:00
Andrew Kelley
587243c7a5
Merge pull request #8273 from jedisct1/pbkdf2-check
...
crypto/pbkdf2: simplify the check for the max number of iterations
2021-03-17 11:25:19 -07:00
Jakub Konka
e5234c0e9e
macho: offset table part of GOT
2021-03-17 12:16:36 +01:00
Jakub Konka
b9fa80e588
macho: use latest bind functionality
2021-03-17 12:10:39 +01:00
Jakub Konka
1181543dad
macho: extract writing stub helper preamble into fn
2021-03-17 12:10:39 +01:00
Jakub Konka
3df2ae1f9d
macho: clean up writing of stub helper section
2021-03-17 12:10:39 +01:00
Jakub Konka
643b4898f5
macho: handle all jumps in stubs on aarch64
2021-03-17 12:10:39 +01:00
Jakub Konka
3019676440
macho: apply some renames to bring closer to zld
2021-03-17 12:10:39 +01:00
Frank Denis
6d9b3e7b19
pbkdf2: use std.math.divCeil()
2021-03-17 10:11:47 +01:00
Evan Haas
f76bd56588
translate-c: fix __builtin_object_size
...
Previous code assumed `c_long` and `usize` were the same size.
Use `isize` instead.
2021-03-17 09:06:47 +02:00
Evan Haas
715370a10a
translate-c: demote usage of un-implemented builtins
2021-03-17 09:06:47 +02:00
Andrew Kelley
4683de1e91
Merge pull request #8252 from tadeokondrak/llvm-bool
...
stage2 llvm bindings: use correct type for LLVMBool for ABI compat
2021-03-16 21:56:00 -07:00
Tadeo Kondrak
e8aa6f90d6
stage2 llvm bindings: use correct type for LLVMBool for ABI compat
2021-03-16 17:05:36 -06:00
Evan Haas
c558a1ae26
translate-c: Implement generic selection expressions
...
Enables translation of C code that uses the `_Generic` keyword
2021-03-17 00:07:33 +02:00
xackus
9a94415680
translate-c: improve std.meta.cast
2021-03-17 00:05:42 +02:00
jacob gw
83d0c2ed67
std: make all errors in os.zig public
2021-03-16 14:48:31 -07:00
Frank Denis
f609c4ddb3
crypto/pbkdf2: use snake_case for variables like everywhere else
2021-03-16 19:08:38 +01:00
Frank Denis
d1b1e542a0
crypto/pbkdf2: simplify the check for the max number of iterations
2021-03-16 18:55:58 +01:00
Lewis Gaul
6787f163eb
zig fmt: don't add trailing whitespace on switch case
2021-03-16 09:26:28 +01:00
LemonBoy
5ecf8bddae
zig fmt: Respect line breaks in struct default value decls
...
Bring this in line with how variable declarations are handled.
Open a new indentation level for the initialization expression to handle
nested expressions like blocks.
Closes #7618
2021-03-16 09:22:16 +01:00
Anders Conbere
f16f25047c
std: support optional getaddrinfo arguments
2021-03-16 01:10:32 +01:00
Lewis Gaul
aa1c780560
Add test for multi-line while cont expr with same-line then expr
2021-03-15 20:44:45 +01:00
Isaac Freund
48efa3bcb6
zig fmt: simplify and improve consistency of if/for/while handling
...
The main realization here was that getting rid of the early returns
in renderWhile() and rewriting the logic into a mostly unified execution
path took things from ~200 lines to ~100 lines and improved consistency
by deduplicating code.
Also add several test cases and fix a few issues along the way:
Fixes https://github.com/ziglang/zig/issues/6114
Fixes https://github.com/ziglang/zig/issues/8022
2021-03-15 14:55:34 +01:00
Lewis Gaul
b4db03d8bb
zig fmt: fix extra newline before if nested in for
...
Add failing testcase to reproduce issue 8088
Tidy up renderWhile(), factoring out renderWhilePayload()
Ensure correct newline is used before 'then' token in while/for/if
Handle indents for 'if' inside 'for' or 'while'
Stop special-casing 'if' compared to 'for' and 'while'
2021-03-15 14:55:34 +01:00
Tadeo Kondrak
277b01a089
stage2 llvm bindings: rename LLVMBool to Bool
2021-03-14 22:32:26 -06:00