Commit Graph

14795 Commits

Author SHA1 Message Date
Jakub Konka
e524f43a6f zld: save rebase and TLV offset as part of TextBlock
instead of as part of the Symbol. This seems to be more
optimal way of handling dyld ops in presence of no splittable
input sections in object files.
2021-07-15 18:49:47 +02:00
Jakub Konka
7c662db8d9 zld: keep text blocks per segment,section pair 2021-07-15 18:49:47 +02:00
Jakub Konka
a04bc1ed14 zld: update relocs and start prepping for segment allocs 2021-07-15 18:49:47 +02:00
Jakub Konka
dfa69e3c30 zld: dealloc TextBlock if omitted 2021-07-15 18:49:47 +02:00
Jakub Konka
555b66c255 zld: move should_rebase logic into Symbol 2021-07-15 18:49:47 +02:00
Jakub Konka
dbd2eb7c7f zld: simplify relocation parsing 2021-07-15 18:49:47 +02:00
Jakub Konka
15b85df3dd zld: parse relocs per generated TextBlock 2021-07-15 18:49:47 +02:00
Jakub Konka
54888c6f46 zld: create TextBlocks for tentative definitions
and fix the links in the `TextBlock`s linked list!
2021-07-15 18:49:47 +02:00
Jakub Konka
51e334af44 zld: refactor section into TextBlocks conversion 2021-07-15 18:49:47 +02:00
Jakub Konka
7b4063d558 zld: convert section in linked list of TextBlocks 2021-07-15 18:49:47 +02:00
Jakub Konka
5649242025 zld: draft up final format of TextBlock 2021-07-15 18:49:47 +02:00
Jakub Konka
5b3c4691e6 zld: put relocs in a TextBlock 2021-07-15 18:49:47 +02:00
Jakub Konka
453c16d8ac zld: draft out splitting sections into blocks 2021-07-15 18:49:47 +02:00
Jakub Konka
669ac92af0 zld: fix ast errors 2021-07-15 18:49:47 +02:00
Jakub Konka
3bd9f38017 zld: reenable entire linker in the new scheme
without the stabs... They are tricky and need a bit more work.
2021-07-15 18:49:47 +02:00
Jakub Konka
7c82079d2c zld: allocate symbols using the new scheme 2021-07-15 18:49:47 +02:00
Jakub Konka
ceb431507d zld: resolve symbols in dylibs using new scheme 2021-07-15 18:49:47 +02:00
Jakub Konka
989639efba zld: coalesce symbols on creation 2021-07-15 18:49:47 +02:00
Jakub Konka
980f2915fa zld: use index to symbol in reloc
instead of pointer to the Symbol struct in the hope that we
can overwrite the Symbol in the object's symbol table with the
resolved Symbol later down the line.
2021-07-15 18:49:46 +02:00
Jakub Konka
ee6e25bc13 zld: add Symbol.Stab and move nlist creation logic there 2021-07-15 18:49:46 +02:00
Jakub Konka
2b3bda43e3 zld: abstract Symbol creation logic 2021-07-15 18:49:46 +02:00
Jakub Konka
3622fe08db zld: abstract away string table with fewer allocs 2021-07-15 18:49:46 +02:00
Jakub Konka
9c3ebe0216 zld: clean up logic for creating mach header 2021-07-15 18:49:46 +02:00
Jakub Konka
e08f7ba889 zld: remove redundant codepaths 2021-07-15 18:49:46 +02:00
g-w1
ee173d5127
parser: require block in suspend expression 2021-07-15 10:55:22 +03:00
Ryan Liptak
4ea7470417 Add inotify_rm_watch definition to c/linux.zig
Also make inotify_add_watch's pathname marked as nul-terminated
2021-07-15 10:54:05 +03:00
Ryan Liptak
a84402d796 Add NotDir as possible error for os.inotify_add_watch
Possible when "mask contains IN_ONLYDIR and pathname is not a directory."
2021-07-15 10:51:25 +03:00
Jacob G-W
1799455e05 astgen: errors for shadowing in if captures 2021-07-14 18:17:55 -04:00
Jacob G-W
759d1d9aef astgen: errors for shadowing in loop captures 2021-07-14 18:03:15 -04:00
leesongun
132b18e2b3
Fix bigint_shl (#9305) 2021-07-13 10:16:57 +03:00
Jonathan Marler
9086452ff9 clarify @bitSizeOf behavior 2021-07-13 10:14:39 +03:00
Jacob G-W
74972531b5 fix doc comment in translate_c 2021-07-13 10:12:31 +03:00
Luna
3e8394776a ci: enable netbsd tarballs
This reverts commit 3063f0a5ed.
2021-07-12 21:44:38 -04:00
Andrew Kelley
9b79ce1cd3
Merge pull request #9365 from ifreund/hash-map-fix
std/hash_map: fix ensureUnusedCapacity() over-allocating
2021-07-12 18:21:19 -04:00
Andrew Kelley
28dd9d478d C backend: TypedefMap is now ArrayHashMap
The C backend depends on insertion order into this map so that type
definitions will be declared before they are used.
2021-07-12 12:40:32 -07:00
Isaac Freund
03156e5899 std/hash_map: fix ensureUnusedCapacity() over-allocating
Currently this function adds the desired unused capactiy to the current
total capacity instead of the current used capactiy.
2021-07-12 11:31:36 -07:00
Andrew Kelley
3063f0a5ed ci: disable netbsd tarballs until the false positives stop 2021-07-11 22:28:03 -07:00
Andrew Kelley
e6d7ac8c9b
Merge pull request #9360 from lun-4/netbsd-ci-2
ci: add scripts for netbsd
2021-07-12 01:15:52 -04:00
Andrew Kelley
a886374df4 ci: netbsd fixups and general cleanup
* remove unused download page html. It's now handled in the
   www.ziglang.org website repo.
 * add netbsd to the downloads index.json file that we send to
   the www.ziglang.org website repo.
 * shallow clone the website repo to avoid downloading old copies of
   data.js unnecessarily.
2021-07-11 22:13:26 -07:00
Luna
c28b227d0b ci: add scripts for netbsd 2021-07-11 22:09:12 -07:00
Martin Wickham
8de5e8bcd1
Merge pull request #9358 from SpexGuy/remove-owner-bb
Remove Stage1AirInst::owner_bb, use zir owner instead.
2021-07-11 22:24:33 -05:00
Martin Wickham
bd1689ae89 Remove Stage1AirInst::owner_bb, use zir owner instead. 2021-07-11 19:16:57 -05:00
Andrew Kelley
7ef8546826
Merge pull request #9352 from g-w1/fix-9346
stage2 astgen: error for return outside of function scope
2021-07-11 15:11:28 -04:00
Jacob G-W
b0b9c3c2dc stage2: remove redundancy from error message
invalid 'try' outside function scope ->
'try' outside function scope
2021-07-11 10:03:47 -04:00
Jacob G-W
18770721ac stage2 astgen: error for return outside of function scope 2021-07-11 10:03:35 -04:00
Kenta Iwasaki
aa2a31612f io_uring: add sqe prep methods for epoll_ctl, poll_add, and poll_remove
Implement io_uring submission queue entry preparation methods for
epoll_ctl, poll_add and poll_remove.

Poll masks are designated as 32-bit little-endian integers as
specified in liburing's definitions.

Updated io_uring_prep_rw to take in an unsigned 64-bit address instead
of an anytype. io_uring_sqe by default assumes that the address
specified in a submission queue entry is an unsigned 64-bit integer.
2021-07-11 09:15:54 +00:00
Martin Wickham
75d1b113aa Rename IrInstSrc to Stage1ZirInst and IrInstGen to Stage1AirInst 2021-07-11 02:00:04 -04:00
Jacob G-W
968d1ecf17 stage2 plan9: add aarch64 support 2021-07-11 01:58:26 -04:00
Andrew Kelley
40764650af stage1: avoid wasting padding with IR instruction tag
For stage1 ZIR instructions and stage1 AIR instructions, the instruction
op code was taking up 8 bytes due to padding even though it only needed
1 byte. This commit reduces the ref_count field from uint32_t to
uint16_t because the code only really cares if instructions are
referenced at all, not how many times they are referenced. With the
ref_count field reduced to uint16_t the uint8_t op code is now placed in
the freed up space.

Empirically, this saves 382 MiB of peak RAM usage when building the
self-hosted compiler, which is a reduction of 5%. Consequently this
resulted in a 3% reduction of cache-misses when building the self-hosted
compiler.

This was @SpexGuy's idea, committed by me because we tested it on my
computer.
2021-07-10 15:38:13 -07:00
Takeshi Yoneda
b9e896d7b0 wasi-libc: remove crt1.o as it's not WASI ABI compatible
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-07-11 00:06:47 +02:00