14654 Commits

Author SHA1 Message Date
Jakub Konka
95aeb09b9b zld: populate sections from the top rather than from bottom 2021-07-15 18:49:47 +02:00
Jakub Konka
714e0c4761 zld: re-enable logging of TextBlocks 2021-07-15 18:49:47 +02:00
Jakub Konka
7aefea614f zld: fix allocating tentative defs 2021-07-15 18:49:47 +02:00
Jakub Konka
3bdb3b574e zld: turn logging off 2021-07-15 18:49:47 +02:00
Jakub Konka
dd5c7588d1 zld: fix resolving TLV offset relocations 2021-07-15 18:49:47 +02:00
Jakub Konka
322be2698d zld: TextBlock needs to be written to an aligend offset too 2021-07-15 18:49:47 +02:00
Jakub Konka
bb5b82cab9 zld: dedup symbols in the symbol table 2021-07-15 18:49:47 +02:00
Jakub Konka
0cc4938419 zld: re-enable all of linker after complete rewrite 2021-07-15 18:49:47 +02:00
Jakub Konka
12187586d1 zld: fix alloc alignment and resolve relocs 2021-07-15 18:49:47 +02:00
Jakub Konka
961b463fad zld: track symbols defined within TextBlock
in case TextBlock represents an entire section with symbols
defined within.
2021-07-15 18:49:47 +02:00
Jakub Konka
7aeedc0912 zld: allocate TextBlocks
temporarily by iterating over all defined TextBlocks. However,
once we merge this with MachO incremental, updates will be done
at the point of creation and/or update.

Also, fix mining TLV knowledge for working out TLV pointers.
2021-07-15 18:49:47 +02:00
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
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 3063f0a5ed373947badd0af056db310283c76e37.
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